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 <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Laurent Pinchart <[email protected]>
1 parent 0cc50ce commit b6041c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)