]> Git Repo - J-linux.git/commitdiff
regulator: tps65910: fix a missing check of return value
authorKangjie Lu <[email protected]>
Fri, 21 Dec 2018 06:29:19 +0000 (00:29 -0600)
committerMark Brown <[email protected]>
Fri, 21 Dec 2018 11:04:59 +0000 (11:04 +0000)
tps65910_reg_set_bits() may fail. The fix checks if it fails, and if so,
returns with its error code.

Signed-off-by: Kangjie Lu <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
drivers/regulator/tps65910-regulator.c

index 02ccdaa226a73f97a5fc812f5173c2bef44d25f4..5ebb6ee73f0770283eff5c15f5c71d0b56fe08bb 100644 (file)
@@ -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:
This page took 0.063397 seconds and 4 git commands to generate.