diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2015-09-24 11:00:14 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-10-03 11:34:20 -0300 |
commit | 08ed049af5e9228d62104fdcecf8d86ccd209639 (patch) | |
tree | ce21b747e4a767ef98d0173bf9d4ffa727df228a /drivers/staging | |
parent | e54560d963866a45e5905a16821e3904ed0c9561 (diff) | |
download | linux-stable-08ed049af5e9228d62104fdcecf8d86ccd209639.tar.gz linux-stable-08ed049af5e9228d62104fdcecf8d86ccd209639.tar.bz2 linux-stable-08ed049af5e9228d62104fdcecf8d86ccd209639.zip |
[media] staging: media: omap4iss: 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/staging')
-rw-r--r-- | drivers/staging/media/omap4iss/iss.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 9bfb725b9986..0b03cb7c59d5 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -1440,12 +1440,13 @@ static int iss_probe(struct platform_device *pdev) iss_reg_read(iss, OMAP4_ISS_MEM_ISP_SYS1, ISP5_REVISION)); /* Interrupt */ - iss->irq_num = platform_get_irq(pdev, 0); - if (iss->irq_num <= 0) { + ret = platform_get_irq(pdev, 0); + if (ret <= 0) { dev_err(iss->dev, "No IRQ resource\n"); ret = -ENODEV; goto error_iss; } + iss->irq_num = ret; if (devm_request_irq(iss->dev, iss->irq_num, iss_isr, IRQF_SHARED, "OMAP4 ISS", iss)) { |