mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
power: qcom_smbb: test the correct variable
"state" is a bool so it's never less than zero. The intent was to test
"ret" instead.
Fixes: 56d7df8716 ('power: Add Qualcomm SMBB driver')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
This commit is contained in:
parent
28153a31b8
commit
0bc58e9381
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue