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>
}
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,
/* 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,