mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 07:30:16 +00:00
media: allegro: fix an error pointer vs NULL check
The allegro_mbox_init() function returns error pointers, it never returns NULL. Fixes: 94dc76560261 ("media: allegro: rework mbox handling") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
43663dc4f4
commit
9bde425e70
@ -2952,7 +2952,7 @@ static int allegro_mcu_hw_init(struct allegro_dev *dev,
|
|||||||
info->mailbox_size);
|
info->mailbox_size);
|
||||||
dev->mbox_status = allegro_mbox_init(dev, info->mailbox_status,
|
dev->mbox_status = allegro_mbox_init(dev, info->mailbox_status,
|
||||||
info->mailbox_size);
|
info->mailbox_size);
|
||||||
if (!dev->mbox_command || !dev->mbox_status) {
|
if (IS_ERR(dev->mbox_command) || IS_ERR(dev->mbox_status)) {
|
||||||
v4l2_err(&dev->v4l2_dev,
|
v4l2_err(&dev->v4l2_dev,
|
||||||
"failed to initialize mailboxes\n");
|
"failed to initialize mailboxes\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user