Skip to content

Commit

Permalink
power: qcom_smbb: test the correct variable
Browse files Browse the repository at this point in the history
"state" is a bool so it's never less than zero.  The intent was to test
"ret" instead.

Fixes: 56d7df8 ('power: Add Qualcomm SMBB driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
  • Loading branch information
Dan Carpenter authored and Sebastian Reichel committed Sep 24, 2015
1 parent 28153a3 commit 0bc58e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/qcom_smbb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0bc58e9

Please sign in to comment.