提交 7c0f812a 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

[media] omap3isp: Defer probe when the IOMMU is not available

When the OMAP3 ISP driver is compiled in the kernel the device can be
probed before the corresponding IOMMU is available. Defer the probe in
that case, and fix a crash in the error path.
Reported-by: NJavier Martin <javier.martin@vista-silicon.com>
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 31036441
......@@ -2249,6 +2249,7 @@ static int isp_probe(struct platform_device *pdev)
ret = iommu_attach_device(isp->domain, &pdev->dev);
if (ret) {
dev_err(&pdev->dev, "can't attach iommu device: %d\n", ret);
ret = -EPROBE_DEFER;
goto free_domain;
}
......@@ -2287,6 +2288,7 @@ static int isp_probe(struct platform_device *pdev)
iommu_detach_device(isp->domain, &pdev->dev);
free_domain:
iommu_domain_free(isp->domain);
isp->domain = NULL;
error_isp:
isp_xclk_cleanup(isp);
omap3isp_put(isp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册