[PATCH -next] media: imx: imx7_mipi_csis: Fix error return code in mipi_csis_async_register()
Wei Yongjun
weiyongjun1 at huawei.com
Mon May 24 06:35:51 PDT 2021
Fix to return negative error code -EINVAL from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 88fc81388df9 ("media: imx: imx7_mipi_csis: Reject invalid data-lanes settings")
Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>
---
drivers/staging/media/imx/imx7-mipi-csis.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
index d573f3475d28..9cd3c86fee58 100644
--- a/drivers/staging/media/imx/imx7-mipi-csis.c
+++ b/drivers/staging/media/imx/imx7-mipi-csis.c
@@ -1175,6 +1175,7 @@ static int mipi_csis_async_register(struct csi_state *state)
if (vep.bus.mipi_csi2.data_lanes[i] != i + 1) {
dev_err(state->dev,
"data lanes reordering is not supported");
+ ret = -EINVAL;
goto err_parse;
}
}
More information about the linux-arm-kernel
mailing list