diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2015-09-24 16:00:12 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-25 11:28:41 +0100 |
commit | 514580f99af8eae246820fe324a78087972a7d63 (patch) | |
tree | 95405bc4e622bd39120f96de07da92adf27b408a /drivers/media/platform/omap3isp | |
parent | [media] v4l: omap3isp: use vb2_buffer_state enum for vb2 buffer state (diff) | |
download | linux-514580f99af8eae246820fe324a78087972a7d63.tar.xz linux-514580f99af8eae246820fe324a78087972a7d63.zip |
[media] v4l: omap3isp: Fix handling platform_get_irq result
The function can return negative value.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/omap3isp')
-rw-r--r-- | drivers/media/platform/omap3isp/isp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 79a0b953bba3..97f6b1824577 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -2528,12 +2528,13 @@ static int isp_probe(struct platform_device *pdev) } /* Interrupt */ - isp->irq_num = platform_get_irq(pdev, 0); - if (isp->irq_num <= 0) { + ret = platform_get_irq(pdev, 0); + if (ret <= 0) { dev_err(isp->dev, "No IRQ resource\n"); ret = -ENODEV; goto error_iommu; } + isp->irq_num = ret; if (devm_request_irq(isp->dev, isp->irq_num, isp_isr, IRQF_SHARED, "OMAP3 ISP", isp)) { |