]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
regulator: pv88060: fix error handling in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 1 Dec 2015 08:29:12 +0000 (11:29 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 1 Dec 2015 13:18:15 +0000 (13:18 +0000)
There were some missing "ret = " assignments here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/pv88060-regulator.c

index 69893f28122a6bc48b8e40f18bdce4bc39561e23..094376c8de4bdb1ae8a5de350d209c267f15a2fd 100644 (file)
@@ -351,14 +351,14 @@ static int pv88060_i2c_probe(struct i2c_client *i2c,
                        return ret;
                }
 
-               regmap_write(chip->regmap, PV88060_REG_MASK_B, 0xFF);
+               ret = regmap_write(chip->regmap, PV88060_REG_MASK_B, 0xFF);
                if (ret < 0) {
                        dev_err(chip->dev,
                                "Failed to mask B reg: %d\n", ret);
                        return ret;
                }
 
-               regmap_write(chip->regmap, PV88060_REG_MASK_C, 0xFF);
+               ret = regmap_write(chip->regmap, PV88060_REG_MASK_C, 0xFF);
                if (ret < 0) {
                        dev_err(chip->dev,
                                "Failed to mask C reg: %d\n", ret);