summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-04 17:39:13 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-15 10:00:00 +0900
commit0ff3e62ff119f2b65b0a8ad48fcb669f609fd904 (patch)
tree5562bd2118d59c0e4db00c03a1a64abea7887d39 /drivers/base
parent98bc7dfd76407eaa0964ecb4d5319c957a3b9df9 (diff)
downloadop-kernel-dev-0ff3e62ff119f2b65b0a8ad48fcb669f609fd904.zip
op-kernel-dev-0ff3e62ff119f2b65b0a8ad48fcb669f609fd904.tar.gz
regmap: Make return code checks consistent
The range code was written to check for return codes less than zero as errors but throughout the rest of the API return codes not equal to zero are errors. Change all these checks to match the house style. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 4bb926c..baf9586 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -606,7 +606,7 @@ struct regmap *regmap_init(struct device *dev,
}
ret = regcache_init(map, config);
- if (ret < 0)
+ if (ret != 0)
goto err_range;
regmap_debugfs_init(map, config->name);
@@ -803,7 +803,7 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg,
map->work_buf = orig_work_buf;
- if (ret < 0)
+ if (ret != 0)
return ret;
}
@@ -854,7 +854,7 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,
if (range) {
ret = _regmap_select_page(map, &reg, range,
val_len / map->format.val_bytes);
- if (ret < 0)
+ if (ret != 0)
return ret;
}
@@ -930,7 +930,7 @@ int _regmap_write(struct regmap *map, unsigned int reg,
range = _regmap_range_lookup(map, reg);
if (range) {
ret = _regmap_select_page(map, &reg, range, 1);
- if (ret < 0)
+ if (ret != 0)
return ret;
}
@@ -1096,7 +1096,7 @@ static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
if (range) {
ret = _regmap_select_page(map, &reg, range,
val_len / map->format.val_bytes);
- if (ret < 0)
+ if (ret != 0)
return ret;
}
OpenPOWER on IntegriCloud