diff options
author | 2020-07-22 14:38:48 +0200 | |
---|---|---|
committer | 2020-08-06 11:27:25 +0200 | |
commit | 9bde425e70b6d6b49f3206a1d3817bccb92a893d (patch) | |
tree | f9672ec4b96195371d322d814d0d64962e834d47 /drivers/staging/media | |
parent | media: meye: fix missing pm_mchip_mode field (diff) | |
download | linux-9bde425e70b6d6b49f3206a1d3817bccb92a893d.tar.gz linux-9bde425e70b6d6b49f3206a1d3817bccb92a893d.tar.bz2 linux-9bde425e70b6d6b49f3206a1d3817bccb92a893d.zip |
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>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/allegro-dvt/allegro-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/allegro-dvt/allegro-core.c b/drivers/staging/media/allegro-dvt/allegro-core.c index 61beae1fca36..9f718f43282b 100644 --- a/drivers/staging/media/allegro-dvt/allegro-core.c +++ b/drivers/staging/media/allegro-dvt/allegro-core.c @@ -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; |