Commit 129f757c authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab

media: staging: rkisp1: isp: check for dphy bus before initializations in s_stream

In rkisp1_isp_s_stream it is better to return error in case the
bus type is not dphy before initializing the registers.
Signed-off-by: default avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 0966f4e5
...@@ -947,14 +947,14 @@ static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable) ...@@ -947,14 +947,14 @@ static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable)
rkisp1->active_sensor = container_of(sensor_sd->asd, rkisp1->active_sensor = container_of(sensor_sd->asd,
struct rkisp1_sensor_async, asd); struct rkisp1_sensor_async, asd);
if (rkisp1->active_sensor->mbus.type != V4L2_MBUS_CSI2_DPHY)
return -EINVAL;
atomic_set(&rkisp1->isp.frame_sequence, -1); atomic_set(&rkisp1->isp.frame_sequence, -1);
ret = rkisp1_config_cif(rkisp1); ret = rkisp1_config_cif(rkisp1);
if (ret) if (ret)
return ret; return ret;
if (rkisp1->active_sensor->mbus.type != V4L2_MBUS_CSI2_DPHY)
return -EINVAL;
ret = rkisp1_mipi_csi2_start(&rkisp1->isp, rkisp1->active_sensor); ret = rkisp1_mipi_csi2_start(&rkisp1->isp, rkisp1->active_sensor);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment