mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
media: allegro: fix an error pointer vs NULL check
The allegro_mbox_init() function returns error pointers, it never
returns NULL.
Fixes: 94dc765602
("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);
|
||||
dev->mbox_status = allegro_mbox_init(dev, info->mailbox_status,
|
||||
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,
|
||||
"failed to initialize mailboxes\n");
|
||||
return -EIO;
|
||||
|
Loading…
Reference in New Issue
Block a user