diff options
author | Dmitry Torokhov <dtor@chromium.org> | 2014-11-14 14:06:37 -0800 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2014-11-14 23:39:40 +0100 |
commit | d95dc9e388104488d0f5a5969c435e601840da2e (patch) | |
tree | 6f4abf2908b13804a442d01d06655ea926d816a3 /drivers/hsi/clients | |
parent | cdb83947ab78dac2477b3d27416fbd1cc480cead (diff) |
HSI: nokia-modem: fix error handling of irq_of_parse_and_map
Return value of irq_of_parse_and_map() is unsigned int, with 0
indicating failure, so testing for negative result never works.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/hsi/clients')
-rw-r--r-- | drivers/hsi/clients/nokia-modem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c index 67b8e8f53a09..f0c21458962c 100644 --- a/drivers/hsi/clients/nokia-modem.c +++ b/drivers/hsi/clients/nokia-modem.c @@ -164,9 +164,9 @@ static int nokia_modem_probe(struct device *dev) dev_set_drvdata(dev, modem); irq = irq_of_parse_and_map(np, 0); - if (irq < 0) { + if (!irq) { dev_err(dev, "Invalid rst_ind interrupt (%d)\n", irq); - return irq; + return -EINVAL; } modem->nokia_modem_rst_ind_irq = irq; pflags = irq_get_trigger_type(irq); |