* [PATCH] media: exynos4-is: check pipe is valid before calling subdev
@ 2017-11-27 13:12 Simon Shields
0 siblings, 0 replies; only message in thread
From: Simon Shields @ 2017-11-27 13:12 UTC (permalink / raw)
To: linux-media
Cc: Krzysztof Kozlowski, Kukjin Kim, Mauro Carvalho Chehab,
linux-samsung-soc, Sylwester Nawrocki
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 <simon@lineageos.org>
---
include/media/drv-intf/exynos-fimc.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/media/drv-intf/exynos-fimc.h b/include/media/drv-intf/exynos-fimc.h
index 69bcd2a07d5c..f9c64338841f 100644
--- a/include/media/drv-intf/exynos-fimc.h
+++ b/include/media/drv-intf/exynos-fimc.h
@@ -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_ */
--
2.15.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-27 13:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-27 13:12 [PATCH] media: exynos4-is: check pipe is valid before calling subdev Simon Shields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).