From: Laurent Pinchart Date: Fri, 11 Nov 2011 14:22:20 +0000 (-0300) Subject: [media] omap3isp: ccdc: Fix crash in HS/VS interrupt handler X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=bd0f2e6da7ea9e225cb2dbd3229e25584b0e9538;p=~shefty%2Frdma-dev.git [media] omap3isp: ccdc: Fix crash in HS/VS interrupt handler The HS/VS interrupt handler needs to access the pipeline object. It erronously tries to get it from the CCDC output video node, which isn't necessarily included in the pipeline. This leads to a NULL pointer dereference. Fix the bug by getting the pipeline object from the CCDC subdev entity. Reported-by: Gary Thomas Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c index b0b0fa5a357..9012b57b3cf 100644 --- a/drivers/media/video/omap3isp/ispccdc.c +++ b/drivers/media/video/omap3isp/ispccdc.c @@ -1406,8 +1406,7 @@ static int __ccdc_handle_stopping(struct isp_ccdc_device *ccdc, u32 event) static void ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc) { - struct isp_pipeline *pipe = - to_isp_pipeline(&ccdc->video_out.video.entity); + struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); struct video_device *vdev = &ccdc->subdev.devnode; struct v4l2_event event;