[media] s5p-fimc: Prevent oops when i2c adapter is not available
Prevent invalid pointer dereference on error path. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Родитель
8ec737ffcc
Коммит
a0f8caefaf
|
@ -98,7 +98,7 @@ static int fimc_subdev_attach(struct fimc_dev *fimc, int index)
|
|||
continue;
|
||||
|
||||
sd = fimc_subdev_register(fimc, isp_info);
|
||||
if (sd) {
|
||||
if (!IS_ERR_OR_NULL(sd)) {
|
||||
vid_cap->sd = sd;
|
||||
vid_cap->input_index = i;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче