diff options
author | Andrey Utkin <andrey.krieger.utkin@gmail.com> | 2014-07-17 09:53:54 -0400 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2014-07-17 16:45:28 -0400 |
commit | b74d4954ae6a6799f7ee832bc377795ab506f4b1 (patch) | |
tree | e2246eadf907336db00ef020c6df0c1509bbd872 /drivers/hsi | |
parent | b357d7b58f379ebe8038cd97b6204f2f5c52220d (diff) |
drivers/hsi/controllers/omap_ssi{,_port}.c: fix failure checks
1.
[linux-3.16-rc5/drivers/hsi/controllers/omap_ssi.c:357]: (style) Checking if
unsigned variable 'gdd_irq' is less than zero.
Source code is
omap_ssi->gdd_irq = platform_get_irq_byname(pd, "gdd_mpu");
if (omap_ssi->gdd_irq < 0) {
2.
[linux-3.16-rc5/drivers/hsi/controllers/omap_ssi_port.c:1017]: (style) Checking
if unsigned variable 'irq' is less than zero.
Source code is
omap_port->irq = platform_get_irq(pd, 0);
if (omap_port->irq < 0) {
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80441
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/hsi')
-rw-r--r-- | drivers/hsi/controllers/omap_ssi.c | 6 | ||||
-rw-r--r-- | drivers/hsi/controllers/omap_ssi_port.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/hsi/controllers/omap_ssi.c b/drivers/hsi/controllers/omap_ssi.c index 0fc7a7fd0140..232ab7340b76 100644 --- a/drivers/hsi/controllers/omap_ssi.c +++ b/drivers/hsi/controllers/omap_ssi.c | |||
@@ -353,12 +353,12 @@ static int __init ssi_add_controller(struct hsi_controller *ssi, | |||
353 | err = ssi_get_iomem(pd, "gdd", &omap_ssi->gdd, NULL); | 353 | err = ssi_get_iomem(pd, "gdd", &omap_ssi->gdd, NULL); |
354 | if (err < 0) | 354 | if (err < 0) |
355 | goto out_err; | 355 | goto out_err; |
356 | omap_ssi->gdd_irq = platform_get_irq_byname(pd, "gdd_mpu"); | 356 | err = platform_get_irq_byname(pd, "gdd_mpu"); |
357 | if (omap_ssi->gdd_irq < 0) { | 357 | if (err < 0) { |
358 | dev_err(&pd->dev, "GDD IRQ resource missing\n"); | 358 | dev_err(&pd->dev, "GDD IRQ resource missing\n"); |
359 | err = omap_ssi->gdd_irq; | ||
360 | goto out_err; | 359 | goto out_err; |
361 | } | 360 | } |
361 | omap_ssi->gdd_irq = err; | ||
362 | tasklet_init(&omap_ssi->gdd_tasklet, ssi_gdd_tasklet, | 362 | tasklet_init(&omap_ssi->gdd_tasklet, ssi_gdd_tasklet, |
363 | (unsigned long)ssi); | 363 | (unsigned long)ssi); |
364 | err = devm_request_irq(&ssi->device, omap_ssi->gdd_irq, ssi_gdd_isr, | 364 | err = devm_request_irq(&ssi->device, omap_ssi->gdd_irq, ssi_gdd_isr, |
diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index 29aea0b93360..001b86820616 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c | |||
@@ -1013,11 +1013,12 @@ static int __init ssi_port_irq(struct hsi_port *port, | |||
1013 | struct omap_ssi_port *omap_port = hsi_port_drvdata(port); | 1013 | struct omap_ssi_port *omap_port = hsi_port_drvdata(port); |
1014 | int err; | 1014 | int err; |
1015 | 1015 | ||
1016 | omap_port->irq = platform_get_irq(pd, 0); | 1016 | err = platform_get_irq(pd, 0); |
1017 | if (omap_port->irq < 0) { | 1017 | if (err < 0) { |
1018 | dev_err(&port->device, "Port IRQ resource missing\n"); | 1018 | dev_err(&port->device, "Port IRQ resource missing\n"); |
1019 | return omap_port->irq; | 1019 | return err; |
1020 | } | 1020 | } |
1021 | omap_port->irq = err; | ||
1021 | tasklet_init(&omap_port->pio_tasklet, ssi_pio_tasklet, | 1022 | tasklet_init(&omap_port->pio_tasklet, ssi_pio_tasklet, |
1022 | (unsigned long)port); | 1023 | (unsigned long)port); |
1023 | err = devm_request_irq(&port->device, omap_port->irq, ssi_pio_isr, | 1024 | err = devm_request_irq(&port->device, omap_port->irq, ssi_pio_isr, |