projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00c2f52
)
extcon: adc-jack: Fix platform_get_irq's error checking
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Thu, 23 Nov 2017 15:55:29 +0000
(21:25 +0530)
committer
Chanwoo Choi
<cw00.choi@samsung.com>
Mon, 27 Nov 2017 01:23:47 +0000
(10:23 +0900)
The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-adc-jack.c
patch
|
blob
|
history
diff --git
a/drivers/extcon/extcon-adc-jack.c
b/drivers/extcon/extcon-adc-jack.c
index 3877d86c746a8ee2090463362d2eb9e7d08ec359..18026354c332cdc42f959ab2190516de019a35b3 100644
(file)
--- a/
drivers/extcon/extcon-adc-jack.c
+++ b/
drivers/extcon/extcon-adc-jack.c
@@
-144,7
+144,7
@@
static int adc_jack_probe(struct platform_device *pdev)
return err;
data->irq = platform_get_irq(pdev, 0);
- if (
!data->irq
) {
+ if (
data->irq < 0
) {
dev_err(&pdev->dev, "platform_get_irq failed\n");
return -ENODEV;
}