Commit b74d4954 authored by Andrey Utkin's avatar Andrey Utkin Committed by Sebastian Reichel

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=80441Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarAndrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent b357d7b5
......@@ -353,12 +353,12 @@ static int __init ssi_add_controller(struct hsi_controller *ssi,
err = ssi_get_iomem(pd, "gdd", &omap_ssi->gdd, NULL);
if (err < 0)
goto out_err;
omap_ssi->gdd_irq = platform_get_irq_byname(pd, "gdd_mpu");
if (omap_ssi->gdd_irq < 0) {
err = platform_get_irq_byname(pd, "gdd_mpu");
if (err < 0) {
dev_err(&pd->dev, "GDD IRQ resource missing\n");
err = omap_ssi->gdd_irq;
goto out_err;
}
omap_ssi->gdd_irq = err;
tasklet_init(&omap_ssi->gdd_tasklet, ssi_gdd_tasklet,
(unsigned long)ssi);
err = devm_request_irq(&ssi->device, omap_ssi->gdd_irq, ssi_gdd_isr,
......
......@@ -1013,11 +1013,12 @@ static int __init ssi_port_irq(struct hsi_port *port,
struct omap_ssi_port *omap_port = hsi_port_drvdata(port);
int err;
omap_port->irq = platform_get_irq(pd, 0);
if (omap_port->irq < 0) {
err = platform_get_irq(pd, 0);
if (err < 0) {
dev_err(&port->device, "Port IRQ resource missing\n");
return omap_port->irq;
return err;
}
omap_port->irq = err;
tasklet_init(&omap_port->pio_tasklet, ssi_pio_tasklet,
(unsigned long)port);
err = devm_request_irq(&port->device, omap_port->irq, ssi_pio_isr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment