summaryrefslogtreecommitdiff
path: root/drivers/hsi/clients
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@chromium.org>2014-11-15 01:06:37 +0300
committerSebastian Reichel <sre@kernel.org>2014-11-15 01:39:40 +0300
commitd95dc9e388104488d0f5a5969c435e601840da2e (patch)
tree6f4abf2908b13804a442d01d06655ea926d816a3 /drivers/hsi/clients
parentcdb83947ab78dac2477b3d27416fbd1cc480cead (diff)
downloadlinux-d95dc9e388104488d0f5a5969c435e601840da2e.tar.xz
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.c4
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);