summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/imx-mailbox.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-04-07 11:27:53 +0200
committerJassi Brar <jaswinder.singh@linaro.org>2020-05-30 23:07:51 +0200
commit1b3a347b7d56aa637157da1b7df225071af1421f (patch)
treef244dda1b86a43b201b5eebb324f8ddfcde3b2b2 /drivers/mailbox/imx-mailbox.c
parentmailbox: imx: Support runtime PM (diff)
downloadlinux-1b3a347b7d56aa637157da1b7df225071af1421f.tar.xz
linux-1b3a347b7d56aa637157da1b7df225071af1421f.zip
mailbox: imx: Fix return in imx_mu_scu_xlate()
This called from mbox_request_channel(). The caller is expecting error pointers and not NULL so this "return NULL;" will lead to an Oops. Fixes: 0a67003b1985 ("mailbox: imx: add SCU MU support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox/imx-mailbox.c')
-rw-r--r--drivers/mailbox/imx-mailbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 97bf0acf51d8..cacc60662f24 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -378,7 +378,7 @@ static struct mbox_chan *imx_mu_scu_xlate(struct mbox_controller *mbox,
break;
default:
dev_err(mbox->dev, "Invalid chan type: %d\n", type);
- return NULL;
+ return ERR_PTR(-EINVAL);
}
if (chan >= mbox->num_chans) {