projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28153a3
)
power: qcom_smbb: test the correct variable
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 24 Sep 2015 18:41:37 +0000
(21:41 +0300)
committer
Sebastian Reichel
<sre@kernel.org>
Thu, 24 Sep 2015 20:35:24 +0000
(22:35 +0200)
"state" is a bool so it's never less than zero. The intent was to test
"ret" instead.
Fixes:
56d7df8716b2
('power: Add Qualcomm SMBB driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/qcom_smbb.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/power/qcom_smbb.c
b/drivers/power/qcom_smbb.c
index 0dabfe8cceb23f68a6daa80e3f9c78914da4df55..5eb1e9e543e2a3cfbf50570a35c213b5c1a831e8 100644
(file)
--- a/
drivers/power/qcom_smbb.c
+++ b/
drivers/power/qcom_smbb.c
@@
-351,7
+351,7
@@
static void smbb_set_line_flag(struct smbb_charger *chg, int irq, int flag)
int ret;
ret = irq_get_irqchip_state(irq, IRQCHIP_STATE_LINE_LEVEL, &state);
- if (
state
< 0) {
+ if (
ret
< 0) {
dev_err(chg->dev, "failed to read irq line\n");
return;
}