Skip to content

Commit

Permalink
[media] s5p-fimc: Prevent oops when i2c adapter is not available
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 8ec737f commit a0f8cae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/s5p-fimc/fimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a0f8cae

Please sign in to comment.