mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 01/15] regulator: wm8350: Do not hardcode return value
@ 2014-02-18 10:40 Sachin Kamat
  2014-02-18 10:40 ` [PATCH 02/15] regulator: ti-abb: " Sachin Kamat
                   ` (14 more replies)
  0 siblings, 15 replies; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/wm8350-regulator.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index de7b9c73e3fa..7ec7c390eeda 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -361,7 +361,7 @@ static int wm8350_dcdc_set_suspend_voltage(struct regulator_dev *rdev, int uV)
 
 	sel = regulator_map_voltage_linear(rdev, uV, uV);
 	if (sel < 0)
-		return -EINVAL;
+		return sel;
 
 	/* all DCDCs have same mV bits */
 	val = wm8350_reg_read(wm8350, volt_reg) & ~WM8350_DC1_VSEL_MASK;
@@ -574,7 +574,7 @@ static int wm8350_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV)
 
 	sel = regulator_map_voltage_linear_range(rdev, uV, uV);
 	if (sel < 0)
-		return -EINVAL;
+		return sel;
 
 	/* all LDOs have same mV bits */
 	val = wm8350_reg_read(wm8350, volt_reg) & ~WM8350_LDO1_VSEL_MASK;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 02/15] regulator: ti-abb: Do not hardcode return value
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
@ 2014-02-18 10:40 ` Sachin Kamat
  2014-02-19 13:07   ` Mark Brown
  2014-02-18 10:40 ` [PATCH 03/15] regulator: ti-abb: Remove redundant error message Sachin Kamat
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/ti-abb-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c
index 804c83a31d69..75fa64769b4b 100644
--- a/drivers/regulator/ti-abb-regulator.c
+++ b/drivers/regulator/ti-abb-regulator.c
@@ -522,7 +522,7 @@ static int ti_abb_init_table(struct device *dev, struct ti_abb *abb,
 	num_entries = of_property_count_u32_elems(dev->of_node, pname);
 	if (num_entries < 0) {
 		dev_err(dev, "No '%s' property?\n", pname);
-		return -ENODEV;
+		return num_entries;
 	}
 
 	if (!num_entries || (num_entries % num_values)) {
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 03/15] regulator: ti-abb: Remove redundant error message
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
  2014-02-18 10:40 ` [PATCH 02/15] regulator: ti-abb: " Sachin Kamat
@ 2014-02-18 10:40 ` Sachin Kamat
  2014-02-19 13:07   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 04/15] regulator: max8973: " Sachin Kamat
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/ti-abb-regulator.c |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c
index 75fa64769b4b..a2dabb575b97 100644
--- a/drivers/regulator/ti-abb-regulator.c
+++ b/drivers/regulator/ti-abb-regulator.c
@@ -533,20 +533,15 @@ static int ti_abb_init_table(struct device *dev, struct ti_abb *abb,
 	num_entries /= num_values;
 
 	info = devm_kzalloc(dev, sizeof(*info) * num_entries, GFP_KERNEL);
-	if (!info) {
-		dev_err(dev, "Can't allocate info table for '%s' property\n",
-			pname);
+	if (!info)
 		return -ENOMEM;
-	}
+
 	abb->info = info;
 
 	volt_table = devm_kzalloc(dev, sizeof(unsigned int) * num_entries,
 				  GFP_KERNEL);
-	if (!volt_table) {
-		dev_err(dev, "Can't allocate voltage table for '%s' property\n",
-			pname);
+	if (!volt_table)
 		return -ENOMEM;
-	}
 
 	abb->rdesc.n_voltages = num_entries;
 	abb->rdesc.volt_table = volt_table;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 04/15] regulator: max8973: Remove redundant error message
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
  2014-02-18 10:40 ` [PATCH 02/15] regulator: ti-abb: " Sachin Kamat
  2014-02-18 10:40 ` [PATCH 03/15] regulator: ti-abb: Remove redundant error message Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 13:08   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 05/15] regulator: max8925: Do not hardcode return value Sachin Kamat
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/max8973-regulator.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index 892aa1e5b96c..79f57fef0038 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -379,10 +379,8 @@ static int max8973_probe(struct i2c_client *client,
 	}
 
 	max = devm_kzalloc(&client->dev, sizeof(*max), GFP_KERNEL);
-	if (!max) {
-		dev_err(&client->dev, "Memory allocation for max failed\n");
+	if (!max)
 		return -ENOMEM;
-	}
 
 	max->regmap = devm_regmap_init_i2c(client, &max8973_regmap_config);
 	if (IS_ERR(max->regmap)) {
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 05/15] regulator: max8925: Do not hardcode return value
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (2 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 04/15] regulator: max8973: " Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 13:08   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 06/15] regulator: lp872x: Do not hardcode return values Sachin Kamat
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/max8925-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index 5b939894bfc4..9c859ed4131b 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -264,7 +264,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev,
 				&max8925_regulator_matches[ridx], 1);
 	of_node_put(np);
 	if (rcount < 0)
-		return -ENODEV;
+		return rcount;
 	config->init_data =	max8925_regulator_matches[ridx].init_data;
 	config->of_node = max8925_regulator_matches[ridx].of_node;
 
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 06/15] regulator: lp872x: Do not hardcode return values
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (3 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 05/15] regulator: max8925: Do not hardcode return value Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:27   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 07/15] regulator: lp3971: Do not hardcode return value Sachin Kamat
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

Propagate the error values returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/lp872x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index 2e4734ff79fc..2e022aabd951 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -211,7 +211,7 @@ static int lp872x_get_timestep_usec(struct lp872x *lp)
 
 	ret = lp872x_read_byte(lp, LP872X_GENERAL_CFG, &val);
 	if (ret)
-		return -EINVAL;
+		return ret;
 
 	val = (val & mask) >> shift;
 	if (val >= size)
@@ -229,7 +229,7 @@ static int lp872x_regulator_enable_time(struct regulator_dev *rdev)
 	u8 addr, val;
 
 	if (time_step_us < 0)
-		return -EINVAL;
+		return time_step_us;
 
 	switch (rid) {
 	case LP8720_ID_LDO1 ... LP8720_ID_BUCK:
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 07/15] regulator: lp3971: Do not hardcode return value
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (4 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 06/15] regulator: lp872x: Do not hardcode return values Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:28   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 08/15] regulator: fan53555: Do not hardcode return values Sachin Kamat
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/lp3971.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index 3b1102b75071..66fd2330dca0 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -327,7 +327,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
 		return -EIO;
 	ret = i2c_smbus_read_byte_data(i2c, reg);
 	if (ret < 0)
-		return -EIO;
+		return ret;
 
 	*dest = ret;
 	return 0;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 08/15] regulator: fan53555: Do not hardcode return values
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (5 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 07/15] regulator: lp3971: Do not hardcode return value Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:30   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 09/15] regulator: da9063: " Sachin Kamat
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

Propagate the error values returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/fan53555.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index 7ca3d9e3b0fe..a10df7d150cc 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -90,11 +90,11 @@ static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV)
 		return 0;
 	ret = regulator_map_voltage_linear(rdev, uV, uV);
 	if (ret < 0)
-		return -EINVAL;
+		return ret;
 	ret = regmap_update_bits(di->regmap, di->sleep_reg,
 					VSEL_NSEL_MASK, ret);
 	if (ret < 0)
-		return -EINVAL;
+		return ret;
 	/* Cache the sleep voltage setting.
 	 * Might not be the real voltage which is rounded */
 	di->sleep_vol_cache = uV;
@@ -260,14 +260,14 @@ static int fan53555_regulator_probe(struct i2c_client *client,
 	ret = regmap_read(di->regmap, FAN53555_ID1, &val);
 	if (ret < 0) {
 		dev_err(&client->dev, "Failed to get chip ID!\n");
-		return -ENODEV;
+		return ret;
 	}
 	di->chip_id = val & DIE_ID;
 	/* Get chip revision */
 	ret = regmap_read(di->regmap, FAN53555_ID2, &val);
 	if (ret < 0) {
 		dev_err(&client->dev, "Failed to get chip Rev!\n");
-		return -ENODEV;
+		return ret;
 	}
 	di->chip_rev = val & DIE_REV;
 	dev_info(&client->dev, "FAN53555 Option[%d] Rev[%d] Detected!\n",
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 09/15] regulator: da9063: Do not hardcode return values
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (6 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 08/15] regulator: fan53555: Do not hardcode return values Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:31   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 10/15] regulator: da9055: Do not hardcode return value Sachin Kamat
                   ` (6 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

Propagate the error values returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/da9063-regulator.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index a61b5d997a08..22ba992e73f2 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -365,7 +365,7 @@ static int da9063_set_suspend_voltage(struct regulator_dev *rdev, int uV)
 
 	sel = regulator_map_voltage_linear(rdev, uV, uV);
 	if (sel < 0)
-		return -EINVAL;
+		return sel;
 
 	sel <<= ffs(rdev->desc->vsel_mask) - 1;
 
@@ -757,7 +757,7 @@ static int da9063_regulator_probe(struct platform_device *pdev)
 	if (ret < 0) {
 		dev_err(&pdev->dev,
 			"Error while reading BUCKs configuration\n");
-		return -EIO;
+		return ret;
 	}
 	bcores_merged = val & DA9063_BCORE_MERGE;
 	bmem_bio_merged = val & DA9063_BUCK_MERGE;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 10/15] regulator: da9055: Do not hardcode return value
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (7 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 09/15] regulator: da9063: " Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:34   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 11/15] regulator: 88pm800: Remove redundant error message Sachin Kamat
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/da9055-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c
index 126e7c6d2c12..9516317e1a9f 100644
--- a/drivers/regulator/da9055-regulator.c
+++ b/drivers/regulator/da9055-regulator.c
@@ -567,7 +567,7 @@ static int da9055_regulator_dt_init(struct platform_device *pdev,
 	of_node_put(nproot);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Error matching regulator: %d\n", ret);
-		return -ENODEV;
+		return ret;
 	}
 
 	config->init_data = da9055_reg_matches[regid].init_data;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 11/15] regulator: 88pm800: Remove redundant error message
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (8 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 10/15] regulator: da9055: Do not hardcode return value Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:34   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 12/15] regulator: act8865: " Sachin Kamat
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/88pm800.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/88pm800.c b/drivers/regulator/88pm800.c
index d333f7eac106..7a721d67e6ac 100644
--- a/drivers/regulator/88pm800.c
+++ b/drivers/regulator/88pm800.c
@@ -310,10 +310,8 @@ static int pm800_regulator_probe(struct platform_device *pdev)
 
 	pm800_data = devm_kzalloc(&pdev->dev, sizeof(*pm800_data),
 					GFP_KERNEL);
-	if (!pm800_data) {
-		dev_err(&pdev->dev, "Failed to allocate pm800_regualtors");
+	if (!pm800_data)
 		return -ENOMEM;
-	}
 
 	pm800_data->map = chip->subchip->regmap_power;
 	pm800_data->chip = chip;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 12/15] regulator: act8865: Remove redundant error message
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (9 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 11/15] regulator: 88pm800: Remove redundant error message Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:35   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 13/15] regulator: arizona-ldo1: " Sachin Kamat
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/act8865-regulator.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
index 2d2c3b004ab7..a5ff30c8a1e3 100644
--- a/drivers/regulator/act8865-regulator.c
+++ b/drivers/regulator/act8865-regulator.c
@@ -228,11 +228,8 @@ static int act8865_pdata_from_dt(struct device *dev,
 	pdata->regulators = devm_kzalloc(dev,
 				sizeof(struct act8865_regulator_data) *
 				ARRAY_SIZE(act8865_matches), GFP_KERNEL);
-	if (!pdata->regulators) {
-		dev_err(dev, "%s: failed to allocate act8865 registor\n",
-						__func__);
+	if (!pdata->regulators)
 		return -ENOMEM;
-	}
 
 	pdata->num_regulators = matched;
 	regulator = pdata->regulators;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 13/15] regulator: arizona-ldo1: Remove redundant error message
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (10 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 12/15] regulator: act8865: " Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:38   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 14/15] regulator: arizona-micsupp: " Sachin Kamat
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/arizona-ldo1.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/arizona-ldo1.c b/drivers/regulator/arizona-ldo1.c
index 4f6c2055f6b2..d8e7db696d5a 100644
--- a/drivers/regulator/arizona-ldo1.c
+++ b/drivers/regulator/arizona-ldo1.c
@@ -189,10 +189,8 @@ static int arizona_ldo1_probe(struct platform_device *pdev)
 	int ret;
 
 	ldo1 = devm_kzalloc(&pdev->dev, sizeof(*ldo1), GFP_KERNEL);
-	if (ldo1 == NULL) {
-		dev_err(&pdev->dev, "Unable to allocate private data\n");
+	if (!ldo1)
 		return -ENOMEM;
-	}
 
 	ldo1->arizona = arizona;
 
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 14/15] regulator: arizona-micsupp: Remove redundant error message
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (11 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 13/15] regulator: arizona-ldo1: " Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19 16:38   ` Mark Brown
  2014-02-18 10:41 ` [PATCH 15/15] regulator: as3711: " Sachin Kamat
  2014-02-19  4:25 ` [PATCH 01/15] regulator: wm8350: Do not hardcode return value Mark Brown
  14 siblings, 1 reply; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/arizona-micsupp.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c
index 034ece707083..6fdd9bf6927f 100644
--- a/drivers/regulator/arizona-micsupp.c
+++ b/drivers/regulator/arizona-micsupp.c
@@ -204,10 +204,8 @@ static int arizona_micsupp_probe(struct platform_device *pdev)
 	int ret;
 
 	micsupp = devm_kzalloc(&pdev->dev, sizeof(*micsupp), GFP_KERNEL);
-	if (micsupp == NULL) {
-		dev_err(&pdev->dev, "Unable to allocate private data\n");
+	if (!micsupp)
 		return -ENOMEM;
-	}
 
 	micsupp->arizona = arizona;
 	INIT_WORK(&micsupp->check_cp_work, arizona_micsupp_check_cp);
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 15/15] regulator: as3711: Remove redundant error message
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (12 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 14/15] regulator: arizona-micsupp: " Sachin Kamat
@ 2014-02-18 10:41 ` Sachin Kamat
  2014-02-19  4:25 ` [PATCH 01/15] regulator: wm8350: Do not hardcode return value Mark Brown
  14 siblings, 0 replies; 29+ messages in thread
From: Sachin Kamat @ 2014-02-18 10:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/regulator/as3711-regulator.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c
index 856c55f3a832..b47283f91e2d 100644
--- a/drivers/regulator/as3711-regulator.c
+++ b/drivers/regulator/as3711-regulator.c
@@ -245,10 +245,8 @@ static int as3711_regulator_probe(struct platform_device *pdev)
 
 	regs = devm_kzalloc(&pdev->dev, AS3711_REGULATOR_NUM *
 			sizeof(struct as3711_regulator), GFP_KERNEL);
-	if (!regs) {
-		dev_err(&pdev->dev, "Memory allocation failed exiting..\n");
+	if (!regs)
 		return -ENOMEM;
-	}
 
 	for (id = 0, ri = as3711_reg_info; id < AS3711_REGULATOR_NUM; ++id, ri++) {
 		reg = &regs[id];
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 01/15] regulator: wm8350: Do not hardcode return value
  2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
                   ` (13 preceding siblings ...)
  2014-02-18 10:41 ` [PATCH 15/15] regulator: as3711: " Sachin Kamat
@ 2014-02-19  4:25 ` Mark Brown
  14 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19  4:25 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

On Tue, Feb 18, 2014 at 04:10:57PM +0530, Sachin Kamat wrote:
> Propagate the error value returned by the function instead.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 02/15] regulator: ti-abb: Do not hardcode return value
  2014-02-18 10:40 ` [PATCH 02/15] regulator: ti-abb: " Sachin Kamat
@ 2014-02-19 13:07   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 13:07 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

On Tue, Feb 18, 2014 at 04:10:58PM +0530, Sachin Kamat wrote:
> Propagate the error value returned by the function instead.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 03/15] regulator: ti-abb: Remove redundant error message
  2014-02-18 10:40 ` [PATCH 03/15] regulator: ti-abb: Remove redundant error message Sachin Kamat
@ 2014-02-19 13:07   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 13:07 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

On Tue, Feb 18, 2014 at 04:10:59PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 04/15] regulator: max8973: Remove redundant error message
  2014-02-18 10:41 ` [PATCH 04/15] regulator: max8973: " Sachin Kamat
@ 2014-02-19 13:08   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 13:08 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

On Tue, Feb 18, 2014 at 04:11:00PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 05/15] regulator: max8925: Do not hardcode return value
  2014-02-18 10:41 ` [PATCH 05/15] regulator: max8925: Do not hardcode return value Sachin Kamat
@ 2014-02-19 13:08   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 13:08 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

On Tue, Feb 18, 2014 at 04:11:01PM +0530, Sachin Kamat wrote:
> Propagate the error value returned by the function instead.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 06/15] regulator: lp872x: Do not hardcode return values
  2014-02-18 10:41 ` [PATCH 06/15] regulator: lp872x: Do not hardcode return values Sachin Kamat
@ 2014-02-19 16:27   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:27 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

On Tue, Feb 18, 2014 at 04:11:02PM +0530, Sachin Kamat wrote:
> Propagate the error values returned by the function instead.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 07/15] regulator: lp3971: Do not hardcode return value
  2014-02-18 10:41 ` [PATCH 07/15] regulator: lp3971: Do not hardcode return value Sachin Kamat
@ 2014-02-19 16:28   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:28 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

On Tue, Feb 18, 2014 at 04:11:03PM +0530, Sachin Kamat wrote:
> Propagate the error value returned by the function instead.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 08/15] regulator: fan53555: Do not hardcode return values
  2014-02-18 10:41 ` [PATCH 08/15] regulator: fan53555: Do not hardcode return values Sachin Kamat
@ 2014-02-19 16:30   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:30 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

On Tue, Feb 18, 2014 at 04:11:04PM +0530, Sachin Kamat wrote:
> Propagate the error values returned by the function instead.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 09/15] regulator: da9063: Do not hardcode return values
  2014-02-18 10:41 ` [PATCH 09/15] regulator: da9063: " Sachin Kamat
@ 2014-02-19 16:31   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:31 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

On Tue, Feb 18, 2014 at 04:11:05PM +0530, Sachin Kamat wrote:
> Propagate the error values returned by the function instead.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 10/15] regulator: da9055: Do not hardcode return value
  2014-02-18 10:41 ` [PATCH 10/15] regulator: da9055: Do not hardcode return value Sachin Kamat
@ 2014-02-19 16:34   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:34 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

On Tue, Feb 18, 2014 at 04:11:06PM +0530, Sachin Kamat wrote:
> Propagate the error value returned by the function instead.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 11/15] regulator: 88pm800: Remove redundant error message
  2014-02-18 10:41 ` [PATCH 11/15] regulator: 88pm800: Remove redundant error message Sachin Kamat
@ 2014-02-19 16:34   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:34 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

On Tue, Feb 18, 2014 at 04:11:07PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thansk.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 12/15] regulator: act8865: Remove redundant error message
  2014-02-18 10:41 ` [PATCH 12/15] regulator: act8865: " Sachin Kamat
@ 2014-02-19 16:35   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:35 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 130 bytes --]

On Tue, Feb 18, 2014 at 04:11:08PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 13/15] regulator: arizona-ldo1: Remove redundant error message
  2014-02-18 10:41 ` [PATCH 13/15] regulator: arizona-ldo1: " Sachin Kamat
@ 2014-02-19 16:38   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:38 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

On Tue, Feb 18, 2014 at 04:11:09PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.  Remember to CC maintainers on patches.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 14/15] regulator: arizona-micsupp: Remove redundant error message
  2014-02-18 10:41 ` [PATCH 14/15] regulator: arizona-micsupp: " Sachin Kamat
@ 2014-02-19 16:38   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2014-02-19 16:38 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

On Tue, Feb 18, 2014 at 04:11:10PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2014-02-19 16:38 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-18 10:40 [PATCH 01/15] regulator: wm8350: Do not hardcode return value Sachin Kamat
2014-02-18 10:40 ` [PATCH 02/15] regulator: ti-abb: " Sachin Kamat
2014-02-19 13:07   ` Mark Brown
2014-02-18 10:40 ` [PATCH 03/15] regulator: ti-abb: Remove redundant error message Sachin Kamat
2014-02-19 13:07   ` Mark Brown
2014-02-18 10:41 ` [PATCH 04/15] regulator: max8973: " Sachin Kamat
2014-02-19 13:08   ` Mark Brown
2014-02-18 10:41 ` [PATCH 05/15] regulator: max8925: Do not hardcode return value Sachin Kamat
2014-02-19 13:08   ` Mark Brown
2014-02-18 10:41 ` [PATCH 06/15] regulator: lp872x: Do not hardcode return values Sachin Kamat
2014-02-19 16:27   ` Mark Brown
2014-02-18 10:41 ` [PATCH 07/15] regulator: lp3971: Do not hardcode return value Sachin Kamat
2014-02-19 16:28   ` Mark Brown
2014-02-18 10:41 ` [PATCH 08/15] regulator: fan53555: Do not hardcode return values Sachin Kamat
2014-02-19 16:30   ` Mark Brown
2014-02-18 10:41 ` [PATCH 09/15] regulator: da9063: " Sachin Kamat
2014-02-19 16:31   ` Mark Brown
2014-02-18 10:41 ` [PATCH 10/15] regulator: da9055: Do not hardcode return value Sachin Kamat
2014-02-19 16:34   ` Mark Brown
2014-02-18 10:41 ` [PATCH 11/15] regulator: 88pm800: Remove redundant error message Sachin Kamat
2014-02-19 16:34   ` Mark Brown
2014-02-18 10:41 ` [PATCH 12/15] regulator: act8865: " Sachin Kamat
2014-02-19 16:35   ` Mark Brown
2014-02-18 10:41 ` [PATCH 13/15] regulator: arizona-ldo1: " Sachin Kamat
2014-02-19 16:38   ` Mark Brown
2014-02-18 10:41 ` [PATCH 14/15] regulator: arizona-micsupp: " Sachin Kamat
2014-02-19 16:38   ` Mark Brown
2014-02-18 10:41 ` [PATCH 15/15] regulator: as3711: " Sachin Kamat
2014-02-19  4:25 ` [PATCH 01/15] regulator: wm8350: Do not hardcode return value Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®