mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
media: rk1608: fix null pointer that no sensor to rk1608
Change-Id: Ida61fd89ad39f641b7add61873a0d0fe05ca66f7 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -1088,6 +1088,11 @@ static int rk1608_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
|
||||
struct rk1608_state, ctrl_handler);
|
||||
int id = pdata->sd.grp_id;
|
||||
|
||||
if (!pdata->sensor[id]) {
|
||||
dev_err(pdata->dev, "Did not find a sensor[%d]!\n", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
remote_ctrl = v4l2_ctrl_find(pdata->sensor[id]->ctrl_handler,
|
||||
ctrl->id);
|
||||
if (remote_ctrl) {
|
||||
|
||||
Reference in New Issue
Block a user