summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2011-02-11 12:33:06 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 04:54:14 -0300
commita0f8caefaf3295721ef00415c7d63ec10af253ab (patch)
tree205e220beaa968f127937777ab51d9076963d12d
parent8ec737ffccd7fab629e28427b4d0581ce62ffedd (diff)
[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>
-rw-r--r--drivers/media/video/s5p-fimc/fimc-capture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
index 6b6f72e4066..423931c0cfe 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -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;