lkml.org 
[lkml]   [2015]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] regulator: pv88060: fix error handling in probe
There were some missing "ret = " assignments here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/regulator/pv88060-regulator.c b/drivers/regulator/pv88060-regulator.c
index 69893f2..094376c 100644
--- a/drivers/regulator/pv88060-regulator.c
+++ b/drivers/regulator/pv88060-regulator.c
@@ -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);

\
 
 \ /
  Last update: 2015-12-01 10:01    [W:0.049 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site