Hi Sakari, Thanks for the patch. On Friday 27 January 2012 10:05:55 Sakari Ailus wrote: > iommu_domain_free() was called in isp_remove() before omap3isp_put(). > omap3isp_put() must not save the context if the IOMMU no longer is there. > Fix this. > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxx> > --- > The issue only seems to affect the staging/for_v3.4 branch in > media-tree.git. > > drivers/media/video/omap3isp/isp.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/drivers/media/video/omap3isp/isp.c > b/drivers/media/video/omap3isp/isp.c index 12d5f92..c3ff142 100644 > --- a/drivers/media/video/omap3isp/isp.c > +++ b/drivers/media/video/omap3isp/isp.c > @@ -1112,7 +1112,8 @@ isp_restore_context(struct isp_device *isp, struct > isp_reg *reg_list) static void isp_save_ctx(struct isp_device *isp) > { > isp_save_context(isp, isp_reg_list); > - omap_iommu_save_ctx(isp->dev); > + if (isp->domain) > + omap_iommu_save_ctx(isp->dev); What about skipping the isp_save_ctx() call completely in omap3isp_put() when isp->domain is NULL ? We don't need to save the ISP context either. > } > > /* > @@ -1981,6 +1982,7 @@ static int isp_remove(struct platform_device *pdev) > omap3isp_get(isp); > iommu_detach_device(isp->domain, &pdev->dev); > iommu_domain_free(isp->domain); > + isp->domain = NULL; > omap3isp_put(isp); > > free_irq(isp->irq_num, isp); -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html