Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: b562abd95672 ("mailbox: mediatek: Add mtk-vcp-mailbox driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>

authored by

Felix Gu and committed by
Jassi Brar
1e0ec971 df1de2ab

+1 -1
+1 -1
drivers/mailbox/mtk-vcp-mailbox.c
··· 50 50 const struct of_phandle_args *sp) 51 51 { 52 52 if (sp->args_count) 53 - return NULL; 53 + return ERR_PTR(-EINVAL); 54 54 55 55 return &mbox->chans[0]; 56 56 }