Two of the error paths in unicam_async_nf_init() when DT parsing fails are not setting the ret variable, resulting in the function returning 0 on error. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> --- This patch should be squashed with "[PATCH v11 4/5] media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface". --- drivers/media/platform/broadcom/bcm2835-unicam.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index e91d02a64770..6ac4ea8efb1a 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -2519,6 +2519,7 @@ static int unicam_async_nf_init(struct unicam_device *unicam) num_data_lanes != 4) { dev_err(unicam->dev, "%u data lanes not supported\n", num_data_lanes); + ret = -EINVAL; goto error; } @@ -2526,6 +2527,7 @@ static int unicam_async_nf_init(struct unicam_device *unicam) dev_err(unicam->dev, "Endpoint uses %u data lanes when %u are supported\n", num_data_lanes, unicam->max_data_lanes); + ret = -EINVAL; goto error; } -- Regards, Laurent Pinchart