summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2021-05-24 15:35:51 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-02 14:16:56 +0200
commit80daed70c6dcc79f5ef36b98157062b0f3522732 (patch)
tree8bca1f5f4510ef978cc3ad4155a0ccd22741103d /drivers/staging
parent25d5ce3a606a1eb23a9265d615a92a876ff9cb5f (diff)
downloadlinux-stable-80daed70c6dcc79f5ef36b98157062b0f3522732.tar.gz
linux-stable-80daed70c6dcc79f5ef36b98157062b0f3522732.tar.bz2
linux-stable-80daed70c6dcc79f5ef36b98157062b0f3522732.zip
media: imx: imx7_mipi_csis: Fix error return code in mipi_csis_async_register()
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@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/imx/imx7-mipi-csis.c1
1 files changed, 1 insertions, 0 deletions
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;
}
}