aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2024-05-08 15:31:00 +0300
committerLaurent Pinchart <[email protected]>2024-05-10 01:08:09 +0300
commitb6041c9e9f2d85514358ed478c53dfabd4015e3b (patch)
tree00553847bc5a1abed5277270fbc8e0d5a9d8e302
parent0cc50ced282a3236c0cac72f72c6b027beaa2660 (diff)
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: 392cd78d495f ("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]>
-rw-r--r--drivers/media/platform/broadcom/bcm2835-unicam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c
index bdcb04d63338..a1d93c14553d 100644
--- a/drivers/media/platform/broadcom/bcm2835-unicam.c
+++ b/drivers/media/platform/broadcom/bcm2835-unicam.c
@@ -2433,9 +2433,9 @@ static int unicam_async_bound(struct v4l2_async_notifier *notifier,
return ret;
source = media_pad_remote_pad_unique(sink);
- if (!source) {
+ if (IS_ERR(source)) {
dev_err(unicam->dev, "No connected sensor pad\n");
- return -ENOTCONN;
+ return PTR_ERR(source);
}
unicam->sensor.subdev = subdev;