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: 88fc81388d ("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>
This commit is contained in:
Wei Yongjun
2021-05-24 15:35:51 +02:00
committed by Mauro Carvalho Chehab
parent 25d5ce3a60
commit 80daed70c6

View File

@@ -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;
}
}