Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bc58e93 authored by Dan Carpenter's avatar Dan Carpenter Committed by Sebastian Reichel
Browse files

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: 56d7df87 ('power: Add Qualcomm SMBB driver')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 28153a31
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}