提交 1b3a347b 编写于 作者: D Dan Carpenter 提交者: Jassi Brar

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: 0a67003b ("mailbox: imx: add SCU MU support")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 676f23ea
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册