projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdb8394
)
HSI: nokia-modem: fix error handling of irq_of_parse_and_map
author
Dmitry Torokhov
<dtor@chromium.org>
Fri, 14 Nov 2014 22:06:37 +0000
(14:06 -0800)
committer
Sebastian Reichel
<sre@kernel.org>
Fri, 14 Nov 2014 22:39:40 +0000
(23:39 +0100)
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>
drivers/hsi/clients/nokia-modem.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hsi/clients/nokia-modem.c
b/drivers/hsi/clients/nokia-modem.c
index 67b8e8f53a0961800e00989cd22661d8bf381ef0..f0c21458962c466329f0f95d800cbd596cc80d1f 100644
(file)
--- 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);