Skip to content

Commit 1b3a347

Browse files
Dan CarpenterJassiBrar
authored andcommitted
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: 0a67003 ("mailbox: imx: add SCU MU support") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 676f23e commit 1b3a347

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mailbox/imx-mailbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ static struct mbox_chan *imx_mu_scu_xlate(struct mbox_controller *mbox,
378378
break;
379379
default:
380380
dev_err(mbox->dev, "Invalid chan type: %d\n", type);
381-
return NULL;
381+
return ERR_PTR(-EINVAL);
382382
}
383383

384384
if (chan >= mbox->num_chans) {

0 commit comments

Comments
 (0)