diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2015-09-24 11:00:13 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-10-03 11:34:52 -0300 |
commit | d2d04834d937bc43b185681a9dcdd67883ed32c7 (patch) | |
tree | d3aed0786a05f469d500148bec188f8a90c2a02e /drivers/media/platform | |
parent | 08ed049af5e9228d62104fdcecf8d86ccd209639 (diff) | |
download | linux-stable-d2d04834d937bc43b185681a9dcdd67883ed32c7.tar.gz linux-stable-d2d04834d937bc43b185681a9dcdd67883ed32c7.tar.bz2 linux-stable-d2d04834d937bc43b185681a9dcdd67883ed32c7.zip |
[media] media: am437x-vpfe: 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: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/am437x/am437x-vpfe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 488d2754c27c..6751aecda0a1 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -2551,11 +2551,12 @@ static int vpfe_probe(struct platform_device *pdev) if (IS_ERR(ccdc->ccdc_cfg.base_addr)) return PTR_ERR(ccdc->ccdc_cfg.base_addr); - vpfe->irq = platform_get_irq(pdev, 0); - if (vpfe->irq <= 0) { + ret = platform_get_irq(pdev, 0); + if (ret <= 0) { dev_err(&pdev->dev, "No IRQ resource\n"); return -ENODEV; } + vpfe->irq = ret; ret = devm_request_irq(vpfe->pdev, vpfe->irq, vpfe_isr, 0, "vpfe_capture0", vpfe); |