Commit be460ced authored by Stepan Ionichev's avatar Stepan Ionichev Committed by Bartosz Golaszewski
Browse files

gpio: pca953x: propagate regulator_enable() error from resume



pca953x_resume() returns 0 when regulator_enable() fails, dropping
the real error code and masking the failure as a successful resume.
The caller then proceeds as if the chip is powered, while the
regulator is in fact disabled.

Return ret so PM core sees the actual failure.

Signed-off-by: default avatarStepan Ionichev <sozdayvek@gmail.com>
Link: https://patch.msgid.link/20260520110504.13969-1-sozdayvek@gmail.com


Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
parent 5200f5f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1411,7 +1411,7 @@ static int pca953x_resume(struct device *dev)
		ret = regulator_enable(chip->regulator);
		if (ret) {
			dev_err(dev, "Failed to enable regulator: %d\n", ret);
			return 0;
			return ret;
		}
	}