media: platform: ti: fix the return value handle for platform_get_irq()
There is no possible for platform_get_irq() to return 0, and the return value of platform_get_irq() is more sensible to show the error reason. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
f312dc7cf1
commit
90fbb259b4
|
@ -2426,10 +2426,8 @@ static int vpfe_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret <= 0) {
|
||||
ret = -ENODEV;
|
||||
if (ret < 0)
|
||||
goto probe_out_cleanup;
|
||||
}
|
||||
vpfe->irq = ret;
|
||||
|
||||
ret = devm_request_irq(vpfe->pdev, vpfe->irq, vpfe_isr, 0,
|
||||
|
|
|
@ -2392,10 +2392,8 @@ static int isp_probe(struct platform_device *pdev)
|
|||
|
||||
/* Interrupt */
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret <= 0) {
|
||||
ret = -ENODEV;
|
||||
if (ret < 0)
|
||||
goto error_iommu;
|
||||
}
|
||||
isp->irq_num = ret;
|
||||
|
||||
if (devm_request_irq(isp->dev, isp->irq_num, isp_isr, IRQF_SHARED,
|
||||
|
|
Loading…
Reference in New Issue