Skip to content

Commit b6041c9

Browse files
Dan Carpenterpinchartl
authored andcommitted
media: bcm2835-unicam: Fix a NULL vs IS_ERR() check
The media_pad_remote_pad_unique() function returns error pointers, not NULL. Update the check accordingly. Fixes: 392cd78 ("media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/fbbe7862-2820-44eb-81cb-7f33b99cca35@moroto.mountain Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1 parent 0cc50ce commit b6041c9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/media/platform/broadcom/bcm2835-unicam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,9 +2433,9 @@ static int unicam_async_bound(struct v4l2_async_notifier *notifier,
24332433
return ret;
24342434

24352435
source = media_pad_remote_pad_unique(sink);
2436-
if (!source) {
2436+
if (IS_ERR(source)) {
24372437
dev_err(unicam->dev, "No connected sensor pad\n");
2438-
return -ENOTCONN;
2438+
return PTR_ERR(source);
24392439
}
24402440

24412441
unicam->sensor.subdev = subdev;

0 commit comments

Comments
 (0)