summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-fimc/fimc-mdevice.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-07-26 07:15:42 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-01 14:56:08 -0300
commit31d34d9bb30fef7aee1800ec63255083dbcdfa83 (patch)
treed5bf85722b9d26e646e77198ed8916cbd7811037 /drivers/media/platform/s5p-fimc/fimc-mdevice.h
parent1bcd7041947287206065af584e15fc4f41113da7 (diff)
[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-mdevice.h')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-mdevice.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.h b/drivers/media/platform/s5p-fimc/fimc-mdevice.h
index 1f5dbaff544..d310d9cc3e1 100644
--- a/drivers/media/platform/s5p-fimc/fimc-mdevice.h
+++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.h
@@ -99,14 +99,12 @@ static inline struct fimc_md *entity_to_fimc_mdev(struct media_entity *me)
static inline void fimc_md_graph_lock(struct fimc_dev *fimc)
{
- BUG_ON(fimc->vid_cap.vfd == NULL);
- mutex_lock(&fimc->vid_cap.vfd->entity.parent->graph_mutex);
+ mutex_lock(&fimc->vid_cap.vfd.entity.parent->graph_mutex);
}
static inline void fimc_md_graph_unlock(struct fimc_dev *fimc)
{
- BUG_ON(fimc->vid_cap.vfd == NULL);
- mutex_unlock(&fimc->vid_cap.vfd->entity.parent->graph_mutex);
+ mutex_unlock(&fimc->vid_cap.vfd.entity.parent->graph_mutex);
}
int fimc_md_set_camclk(struct v4l2_subdev *sd, bool on);