phy: phy-rockchip-mipi-rx: increase the check whether the sensor is null

Change-Id: Ic80a97e5bf195ee236f7869755b88e825e57744e
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
This commit is contained in:
Xu Hongfei
2019-06-06 11:58:50 +08:00
committed by Tao Huang
parent 7e93cc8f5d
commit 3be8b37f59

View File

@@ -728,8 +728,10 @@ static int mipidphy_g_mbus_config(struct v4l2_subdev *sd,
struct v4l2_subdev *sensor_sd = get_remote_sensor(sd);
struct mipidphy_sensor *sensor = sd_to_sensor(priv, sensor_sd);
mipidphy_update_sensor_mbus(sd);
*config = sensor->mbus;
if (sensor_sd) {
mipidphy_update_sensor_mbus(sd);
*config = sensor->mbus;
}
return 0;
}