mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mailbox: bcm2835: Fix of_xlate return value
The bcm2835-mailbox returns NULL instead of an error pointer, which could
result in a NULL ptr dereference in mbox_request_channel. So fix this
by returning a proper error pointer.
Signed-off-by: Stefan Wahren <[email protected]>
Fixes: 0bae6af6d7 ("mailbox: Enable BCM2835 mailbox support")
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Jassi Brar <[email protected]>
This commit is contained in:
parent
61a2f6db77
commit
00ee3a13a9
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ static struct mbox_chan *bcm2835_mbox_index_xlate(struct mbox_controller *mbox,
|
|||
const struct of_phandle_args *sp)
|
||||
{
|
||||
if (sp->args_count != 0)
|
||||
return NULL;
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
return &mbox->chans[0];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue