summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-fimc/fimc-reg.c
diff options
context:
space:
mode:
authorSylwester Nawrocki2012-07-26 12:15:42 +0200
committerMauro Carvalho Chehab2012-10-01 19:56:08 +0200
commit31d34d9bb30fef7aee1800ec63255083dbcdfa83 (patch)
treed5bf85722b9d26e646e77198ed8916cbd7811037 /drivers/media/platform/s5p-fimc/fimc-reg.c
parent[media] s5p-fimc: Don't allocate fimc-lite video device structure dynamically (diff)
downloadkernel-qcow2-linux-31d34d9bb30fef7aee1800ec63255083dbcdfa83.tar.gz
kernel-qcow2-linux-31d34d9bb30fef7aee1800ec63255083dbcdfa83.tar.xz
kernel-qcow2-linux-31d34d9bb30fef7aee1800ec63255083dbcdfa83.zip
[media] s5p-fimc: Don't allocate fimc-capture video device dynamically
This fixes potential invalid pointer de-reference, when media_entity_cleanup() is called before video device is unregistered. 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>
Diffstat (limited to 'drivers/media/platform/s5p-fimc/fimc-reg.c')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-reg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-reg.c b/drivers/media/platform/s5p-fimc/fimc-reg.c
index 0e3eb9ce4f98..783408fd7d56 100644
--- a/drivers/media/platform/s5p-fimc/fimc-reg.c
+++ b/drivers/media/platform/s5p-fimc/fimc-reg.c
@@ -612,7 +612,7 @@ int fimc_hw_set_camera_source(struct fimc_dev *fimc,
}
if (i == ARRAY_SIZE(pix_desc)) {
- v4l2_err(fimc->vid_cap.vfd,
+ v4l2_err(&fimc->vid_cap.vfd,
"Camera color format not supported: %d\n",
fimc->vid_cap.mf.code);
return -EINVAL;
@@ -684,7 +684,7 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc,
cfg |= FIMC_REG_CIGCTRL_CAM_JPEG;
break;
default:
- v4l2_err(vid_cap->vfd,
+ v4l2_err(&vid_cap->vfd,
"Not supported camera pixel format: %#x\n",
vid_cap->mf.code);
return -EINVAL;
@@ -701,7 +701,7 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc,
cfg |= FIMC_REG_CIGCTRL_CAMIF_SELWB;
break;
default:
- v4l2_err(vid_cap->vfd, "Invalid camera bus type selected\n");
+ v4l2_err(&vid_cap->vfd, "Invalid camera bus type selected\n");
return -EINVAL;
}
writel(cfg, fimc->regs + FIMC_REG_CIGCTRL);