Skip to content

Commit

Permalink
media: exynos4-is: Check pipe is valid before calling subdev
Browse files Browse the repository at this point in the history
If the subdev is not yet present (probably because the subdev
module has not yet been loaded), the pipe will be NULL. Make sure
that this is not the case before attempting to call the op.

Signed-off-by: Simon Shields <[email protected]>
Signed-off-by: Sylwester Nawrocki <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
fourkbomb authored and mchehab committed Dec 18, 2017
1 parent 2d41a0c commit 3090a19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/media/drv-intf/exynos-fimc.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ static inline struct exynos_video_entity *vdev_to_exynos_video_entity(
}

#define fimc_pipeline_call(ent, op, args...) \
(!(ent) ? -ENOENT : (((ent)->pipe->ops && (ent)->pipe->ops->op) ? \
((!(ent) || !(ent)->pipe) ? -ENOENT : \
(((ent)->pipe->ops && (ent)->pipe->ops->op) ? \
(ent)->pipe->ops->op(((ent)->pipe), ##args) : -ENOIOCTLCMD)) \

#endif /* S5P_FIMC_H_ */

0 comments on commit 3090a19

Please sign in to comment.