mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
mailbox: mtk-vcp-mailbox: Fix the return value in mtk_vcp_mbox_xlate()
The return value of mtk_vcp_mbox_xlate() is checked by IS_ERR(), so
return NULL is incorrect and could lead to a NULL pointer dereference.
Fixes: b562abd956 ("mailbox: mediatek: Add mtk-vcp-mailbox driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
This commit is contained in:
parent
df1de2abf9
commit
1e0ec9719f
|
|
@ -50,7 +50,7 @@ static struct mbox_chan *mtk_vcp_mbox_xlate(struct mbox_controller *mbox,
|
|||
const struct of_phandle_args *sp)
|
||||
{
|
||||
if (sp->args_count)
|
||||
return NULL;
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
return &mbox->chans[0];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user