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: 392cd78d49 ("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>
This commit is contained in:
committed by
Laurent Pinchart
parent
0cc50ced28
commit
b6041c9e9f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user