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

Unverified Commit cd07e370 authored by Kangjie Lu's avatar Kangjie Lu Committed by Mark Brown
Browse files

regulator: tps65910: fix a missing check of return value



tps65910_reg_set_bits() may fail. The fix checks if it fails, and if so,
returns with its error code.

Signed-off-by: default avatarKangjie Lu <kjlu@umn.edu>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 77ea9060
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1102,8 +1102,10 @@ static int tps65910_probe(struct platform_device *pdev)
	platform_set_drvdata(pdev, pmic);

	/* Give control of all register to control port */
	tps65910_reg_set_bits(pmic->mfd, TPS65910_DEVCTRL,
	err = tps65910_reg_set_bits(pmic->mfd, TPS65910_DEVCTRL,
				DEVCTRL_SR_CTL_I2C_SEL_MASK);
	if (err < 0)
		return err;

	switch (tps65910_chip_id(tps65910)) {
	case TPS65910: