aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-04 12:39:13 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-14 21:00:00 -0400
commit0ff3e62ff119f2b65b0a8ad48fcb669f609fd904 (patch)
tree5562bd2118d59c0e4db00c03a1a64abea7887d39 /drivers/base
parent98bc7dfd76407eaa0964ecb4d5319c957a3b9df9 (diff)
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 4bb926cd7bf2..baf9586b4fd8 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -606,7 +606,7 @@ struct regmap *regmap_init(struct device *dev,
606 } 606 }
607 607
608 ret = regcache_init(map, config); 608 ret = regcache_init(map, config);
609 if (ret < 0) 609 if (ret != 0)
610 goto err_range; 610 goto err_range;
611 611
612 regmap_debugfs_init(map, config->name); 612 regmap_debugfs_init(map, config->name);
@@ -803,7 +803,7 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg,
803 803
804 map->work_buf = orig_work_buf; 804 map->work_buf = orig_work_buf;
805 805
806 if (ret < 0) 806 if (ret != 0)
807 return ret; 807 return ret;
808 } 808 }
809 809
@@ -854,7 +854,7 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,
854 if (range) { 854 if (range) {
855 ret = _regmap_select_page(map, &reg, range, 855 ret = _regmap_select_page(map, &reg, range,
856 val_len / map->format.val_bytes); 856 val_len / map->format.val_bytes);
857 if (ret < 0) 857 if (ret != 0)
858 return ret; 858 return ret;
859 } 859 }
860 860
@@ -930,7 +930,7 @@ int _regmap_write(struct regmap *map, unsigned int reg,
930 range = _regmap_range_lookup(map, reg); 930 range = _regmap_range_lookup(map, reg);
931 if (range) { 931 if (range) {
932 ret = _regmap_select_page(map, &reg, range, 1); 932 ret = _regmap_select_page(map, &reg, range, 1);
933 if (ret < 0) 933 if (ret != 0)
934 return ret; 934 return ret;
935 } 935 }
936 936
@@ -1096,7 +1096,7 @@ static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
1096 if (range) { 1096 if (range) {
1097 ret = _regmap_select_page(map, &reg, range, 1097 ret = _regmap_select_page(map, &reg, range,
1098 val_len / map->format.val_bytes); 1098 val_len / map->format.val_bytes);
1099 if (ret < 0) 1099 if (ret != 0)
1100 return ret; 1100 return ret;
1101 } 1101 }
1102 1102