media: exynos4-is: check pipe is valid before calling subdev
Subsystems (2)
PATCH 1/1 media: exynos4-is: check pipe is valid before calling subdev
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]>
--- include/media/drv-intf/exynos-fimc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/media/drv-intf/exynos-fimc.h +2 -1
@@ -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_ */
Signature · 1 line
2.15.0