summaryrefslogtreecommitdiff
path: root/sound/soc/sof/imx/imx8m.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-10-07 01:40:17 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-10-07 01:40:17 +0300
commitb08cadbd3b8721db738d9a00ef3ce3ed667e6d9c (patch)
tree1b44ef760764ea19f82fd80088135d23ab565d2d /sound/soc/sof/imx/imx8m.c
parentdb2b0c5d7b6f19b3c2cab08c531b65342eb5252b (diff)
parentfe255fe6ad97685e5a4be0d871f43288dbc10ad6 (diff)
downloadlinux-b08cadbd3b8721db738d9a00ef3ce3ed667e6d9c.tar.xz
Merge branch 'objtool/urgent'
Fixup conflicts. # Conflicts: # tools/objtool/check.c
Diffstat (limited to 'sound/soc/sof/imx/imx8m.c')
-rw-r--r--sound/soc/sof/imx/imx8m.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
index cb822d953767..892e1482f97f 100644
--- a/sound/soc/sof/imx/imx8m.c
+++ b/sound/soc/sof/imx/imx8m.c
@@ -228,7 +228,14 @@ static int imx8m_remove(struct snd_sof_dev *sdev)
/* on i.MX8 there is 1 to 1 match between type and BAR idx */
static int imx8m_get_bar_index(struct snd_sof_dev *sdev, u32 type)
{
- return type;
+ /* Only IRAM and SRAM bars are valid */
+ switch (type) {
+ case SOF_FW_BLK_TYPE_IRAM:
+ case SOF_FW_BLK_TYPE_SRAM:
+ return type;
+ default:
+ return -EINVAL;
+ }
}
static void imx8m_ipc_msg_data(struct snd_sof_dev *sdev,