diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-09-24 21:41:37 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-09-24 22:35:24 +0200 |
commit | 0bc58e93819d542475cd9390921db509a283fe72 (patch) | |
tree | 8237bcc342c2d8363141597ac37fbb807b85137c /drivers/power | |
parent | 28153a31b8b6c44e4f1e24dafce2f1b22cec427b (diff) | |
download | linux-0bc58e93819d542475cd9390921db509a283fe72.tar.bz2 |
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: 56d7df8716b2 ('power: Add Qualcomm SMBB driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/qcom_smbb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/qcom_smbb.c b/drivers/power/qcom_smbb.c index 0dabfe8cceb2..5eb1e9e543e2 100644 --- 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; } |