summaryrefslogtreecommitdiffstats
path: root/drivers/hsi
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@chromium.org>2014-11-14 14:06:37 -0800
committerSebastian Reichel <sre@kernel.org>2014-11-14 23:39:40 +0100
commitd95dc9e388104488d0f5a5969c435e601840da2e (patch)
tree6f4abf2908b13804a442d01d06655ea926d816a3 /drivers/hsi
parentcdb83947ab78dac2477b3d27416fbd1cc480cead (diff)
downloadop-kernel-dev-d95dc9e388104488d0f5a5969c435e601840da2e.zip
op-kernel-dev-d95dc9e388104488d0f5a5969c435e601840da2e.tar.gz
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')
-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 67b8e8f..f0c2145 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);
OpenPOWER on IntegriCloud