2014-02-20 08:58:55

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 01/23] regulator: da9063: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Krystian Garbaciak <[email protected]>
---
drivers/regulator/da9063-regulator.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index 22ba992e73f2..38ad5e950907 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -776,10 +776,8 @@ static int da9063_regulator_probe(struct platform_device *pdev)
size = sizeof(struct da9063_regulators) +
n_regulators * sizeof(struct da9063_regulator);
regulators = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
- if (!regulators) {
- dev_err(&pdev->dev, "No memory for regulators\n");
+ if (!regulators)
return -ENOMEM;
- }

regulators->n_regulators = n_regulators;
platform_set_drvdata(pdev, regulators);
--
1.7.9.5


2014-02-20 08:59:00

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 02/23] regulator: da9210: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: S Twiss <[email protected]>
---
drivers/regulator/da9210-regulator.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
index 6f5ecbe1132e..7a320dd11c46 100644
--- a/drivers/regulator/da9210-regulator.c
+++ b/drivers/regulator/da9210-regulator.c
@@ -134,11 +134,8 @@ static int da9210_i2c_probe(struct i2c_client *i2c,
int error;

chip = devm_kzalloc(&i2c->dev, sizeof(struct da9210), GFP_KERNEL);
- if (NULL == chip) {
- dev_err(&i2c->dev,
- "Cannot kzalloc memory for regulator structure\n");
+ if (!chip)
return -ENOMEM;
- }

chip->regmap = devm_regmap_init_i2c(i2c, &da9210_regmap_config);
if (IS_ERR(chip->regmap)) {
--
1.7.9.5

2014-02-20 08:59:10

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 05/23] regulator: fixed: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/fixed.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 3c307d62fd31..c61f7e97e4f8 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -130,10 +130,8 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)

drvdata = devm_kzalloc(&pdev->dev, sizeof(struct fixed_voltage_data),
GFP_KERNEL);
- if (drvdata == NULL) {
- dev_err(&pdev->dev, "Failed to allocate device data\n");
+ if (!drvdata)
return -ENOMEM;
- }

drvdata->desc.name = devm_kstrdup(&pdev->dev,
config->supply_name,
--
1.7.9.5

2014-02-20 08:59:05

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 03/23] regulator: dbx500: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Sundar Iyer <[email protected]>
---
drivers/regulator/dbx500-prcmu.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c
index ce89f7848a57..f111dfb8d2d7 100644
--- a/drivers/regulator/dbx500-prcmu.c
+++ b/drivers/regulator/dbx500-prcmu.c
@@ -202,18 +202,12 @@ ux500_regulator_debug_init(struct platform_device *pdev,
rdebug.num_regulators = num_regulators;

rdebug.state_before_suspend = kzalloc(num_regulators, GFP_KERNEL);
- if (!rdebug.state_before_suspend) {
- dev_err(&pdev->dev,
- "could not allocate memory for saving state\n");
+ if (!rdebug.state_before_suspend)
goto exit_destroy_power_state;
- }

rdebug.state_after_suspend = kzalloc(num_regulators, GFP_KERNEL);
- if (!rdebug.state_after_suspend) {
- dev_err(&pdev->dev,
- "could not allocate memory for saving state\n");
+ if (!rdebug.state_after_suspend)
goto exit_free;
- }

dbx500_regulator_testcase(regulator_info, num_regulators);
return 0;
--
1.7.9.5

2014-02-20 08:59:16

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 07/23] regulator: max8907: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/max8907-regulator.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index afda8c6af721..ed90c759c231 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -292,10 +292,9 @@ static int max8907_regulator_probe(struct platform_device *pdev)
return ret;

pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
- if (!pmic) {
- dev_err(&pdev->dev, "Failed to alloc pmic\n");
+ if (!pmic)
return -ENOMEM;
- }
+
platform_set_drvdata(pdev, pmic);

memcpy(pmic->desc, max8907_regulators, sizeof(pmic->desc));
--
1.7.9.5

2014-02-20 08:59:20

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 09/23] regulator: max8997: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/max8997.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
index 10108f2941e3..f657d8db9c0c 100644
--- a/drivers/regulator/max8997.c
+++ b/drivers/regulator/max8997.c
@@ -937,7 +937,6 @@ static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev,
pdata->num_regulators, GFP_KERNEL);
if (!rdata) {
of_node_put(regulators_np);
- dev_err(&pdev->dev, "could not allocate memory for regulator data\n");
return -ENOMEM;
}

--
1.7.9.5

2014-02-20 08:59:33

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 13/23] regulator: tps62360: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Laxman Dewangan <[email protected]>
---
drivers/regulator/tps62360-regulator.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index c3fa15a299b1..a1672044e519 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -299,10 +299,8 @@ static struct tps62360_regulator_platform_data *
struct device_node *np = dev->of_node;

pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- dev_err(dev, "Memory alloc failed for platform data\n");
+ if (!pdata)
return NULL;
- }

pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node);
if (!pdata->reg_init_data) {
@@ -377,11 +375,8 @@ static int tps62360_probe(struct i2c_client *client,
}

tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
- if (!tps) {
- dev_err(&client->dev, "%s(): Memory allocation failed\n",
- __func__);
+ if (!tps)
return -ENOMEM;
- }

tps->en_discharge = pdata->en_discharge;
tps->en_internal_pulldn = pdata->en_internal_pulldn;
--
1.7.9.5

2014-02-20 08:59:49

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 19/23] regulator: tps80031: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Laxman Dewangan <[email protected]>
---
drivers/regulator/tps80031-regulator.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c
index 71f457a42623..ac88c988bb2e 100644
--- a/drivers/regulator/tps80031-regulator.c
+++ b/drivers/regulator/tps80031-regulator.c
@@ -693,10 +693,8 @@ static int tps80031_regulator_probe(struct platform_device *pdev)

pmic = devm_kzalloc(&pdev->dev,
TPS80031_REGULATOR_MAX * sizeof(*pmic), GFP_KERNEL);
- if (!pmic) {
- dev_err(&pdev->dev, "mem alloc for pmic failed\n");
+ if (!pmic)
return -ENOMEM;
- }

for (num = 0; num < TPS80031_REGULATOR_MAX; ++num) {
tps_pdata = pdata->regulator_pdata[num];
--
1.7.9.5

2014-02-20 08:59:53

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 20/23] regulator: wm831x-dcdc: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/wm831x-dcdc.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index 04cf9c16ef23..0d88a82ab2a2 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -469,10 +469,8 @@ static int wm831x_buckv_probe(struct platform_device *pdev)

dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
GFP_KERNEL);
- if (dcdc == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!dcdc)
return -ENOMEM;
- }

dcdc->wm831x = wm831x;

@@ -622,10 +620,8 @@ static int wm831x_buckp_probe(struct platform_device *pdev)

dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
GFP_KERNEL);
- if (dcdc == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!dcdc)
return -ENOMEM;
- }

dcdc->wm831x = wm831x;

@@ -752,10 +748,8 @@ static int wm831x_boostp_probe(struct platform_device *pdev)
return -ENODEV;

dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
- if (dcdc == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!dcdc)
return -ENOMEM;
- }

dcdc->wm831x = wm831x;

@@ -842,10 +836,8 @@ static int wm831x_epe_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing EPE%d\n", id + 1);

dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
- if (dcdc == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!dcdc)
return -ENOMEM;
- }

dcdc->wm831x = wm831x;

--
1.7.9.5

2014-02-20 09:00:03

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 23/23] regulator: wm8994: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/wm8994-regulator.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index 71c5911f2e71..c24346db8a71 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -134,10 +134,8 @@ static int wm8994_ldo_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);

ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm8994_ldo), GFP_KERNEL);
- if (ldo == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!ldo)
return -ENOMEM;
- }

ldo->wm8994 = wm8994;
ldo->supply = wm8994_ldo_consumer[id];
--
1.7.9.5

2014-02-20 08:59:58

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 22/23] regulator: wm831x-ldo: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/wm831x-ldo.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 46d6700467b5..eca0eeb78acd 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -235,10 +235,8 @@ static int wm831x_gp_ldo_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);

ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
- if (ldo == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!ldo)
return -ENOMEM;
- }

ldo->wm831x = wm831x;

@@ -447,10 +445,8 @@ static int wm831x_aldo_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);

ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
- if (ldo == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!ldo)
return -ENOMEM;
- }

ldo->wm831x = wm831x;

@@ -594,10 +590,8 @@ static int wm831x_alive_ldo_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);

ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
- if (ldo == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!ldo)
return -ENOMEM;
- }

ldo->wm831x = wm831x;

--
1.7.9.5

2014-02-20 09:00:47

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 21/23] regulator: wm831x-isink: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/wm831x-isink.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 0339b886df5d..72e385e76a9d 100644
--- a/drivers/regulator/wm831x-isink.c
+++ b/drivers/regulator/wm831x-isink.c
@@ -165,10 +165,8 @@ static int wm831x_isink_probe(struct platform_device *pdev)

isink = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_isink),
GFP_KERNEL);
- if (isink == NULL) {
- dev_err(&pdev->dev, "Unable to allocate private data\n");
+ if (!isink)
return -ENOMEM;
- }

isink->wm831x = wm831x;

--
1.7.9.5

2014-02-20 08:59:47

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 18/23] regulator: tps65910: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Graeme Gregory <[email protected]>
---
drivers/regulator/tps65910-regulator.c | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index f50dd847eebc..fa7db8847578 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -1011,11 +1011,8 @@ static struct tps65910_board *tps65910_parse_dt_reg_data(

pmic_plat_data = devm_kzalloc(&pdev->dev, sizeof(*pmic_plat_data),
GFP_KERNEL);
-
- if (!pmic_plat_data) {
- dev_err(&pdev->dev, "Failure to alloc pdata for regulators.\n");
+ if (!pmic_plat_data)
return NULL;
- }

np = of_node_get(pdev->dev.parent->of_node);
regulators = of_get_child_by_name(np, "regulators");
@@ -1098,10 +1095,8 @@ static int tps65910_probe(struct platform_device *pdev)
}

pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
- if (!pmic) {
- dev_err(&pdev->dev, "Memory allocation failed for pmic\n");
+ if (!pmic)
return -ENOMEM;
- }

pmic->mfd = tps65910;
platform_set_drvdata(pdev, pmic);
@@ -1130,24 +1125,18 @@ static int tps65910_probe(struct platform_device *pdev)

pmic->desc = devm_kzalloc(&pdev->dev, pmic->num_regulators *
sizeof(struct regulator_desc), GFP_KERNEL);
- if (!pmic->desc) {
- dev_err(&pdev->dev, "Memory alloc fails for desc\n");
+ if (!pmic->desc)
return -ENOMEM;
- }

pmic->info = devm_kzalloc(&pdev->dev, pmic->num_regulators *
sizeof(struct tps_info *), GFP_KERNEL);
- if (!pmic->info) {
- dev_err(&pdev->dev, "Memory alloc fails for info\n");
+ if (!pmic->info)
return -ENOMEM;
- }

pmic->rdev = devm_kzalloc(&pdev->dev, pmic->num_regulators *
sizeof(struct regulator_dev *), GFP_KERNEL);
- if (!pmic->rdev) {
- dev_err(&pdev->dev, "Memory alloc fails for rdev\n");
+ if (!pmic->rdev)
return -ENOMEM;
- }

for (i = 0; i < pmic->num_regulators && i < TPS65910_NUM_REGS;
i++, info++) {
--
1.7.9.5

2014-02-20 08:59:43

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 15/23] regulator: tps65090: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Venu Byravarasu <[email protected]>
---
drivers/regulator/tps65090-regulator.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c
index 5674f886c471..2e92ef68574d 100644
--- a/drivers/regulator/tps65090-regulator.c
+++ b/drivers/regulator/tps65090-regulator.c
@@ -168,17 +168,13 @@ static struct tps65090_platform_data *tps65090_parse_dt_reg_data(

tps65090_pdata = devm_kzalloc(&pdev->dev, sizeof(*tps65090_pdata),
GFP_KERNEL);
- if (!tps65090_pdata) {
- dev_err(&pdev->dev, "Memory alloc for tps65090_pdata failed\n");
+ if (!tps65090_pdata)
return ERR_PTR(-ENOMEM);
- }

reg_pdata = devm_kzalloc(&pdev->dev, TPS65090_REGULATOR_MAX *
sizeof(*reg_pdata), GFP_KERNEL);
- if (!reg_pdata) {
- dev_err(&pdev->dev, "Memory alloc for reg_pdata failed\n");
+ if (!reg_pdata)
return ERR_PTR(-ENOMEM);
- }

regulators = of_get_child_by_name(np, "regulators");
if (!regulators) {
@@ -253,10 +249,8 @@ static int tps65090_regulator_probe(struct platform_device *pdev)

pmic = devm_kzalloc(&pdev->dev, TPS65090_REGULATOR_MAX * sizeof(*pmic),
GFP_KERNEL);
- if (!pmic) {
- dev_err(&pdev->dev, "mem alloc for pmic failed\n");
+ if (!pmic)
return -ENOMEM;
- }

for (num = 0; num < TPS65090_REGULATOR_MAX; num++) {
tps_pdata = tps65090_pdata->reg_pdata[num];
--
1.7.9.5

2014-02-20 08:59:41

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 16/23] regulator: tps6524x: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/tps6524x-regulator.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c
index 9f6bfda711b7..5b494db9f95c 100644
--- a/drivers/regulator/tps6524x-regulator.c
+++ b/drivers/regulator/tps6524x-regulator.c
@@ -593,10 +593,9 @@ static int pmic_probe(struct spi_device *spi)
}

hw = devm_kzalloc(&spi->dev, sizeof(struct tps6524x), GFP_KERNEL);
- if (!hw) {
- dev_err(dev, "cannot allocate regulator private data\n");
+ if (!hw)
return -ENOMEM;
- }
+
spi_set_drvdata(spi, hw);

memset(hw, 0, sizeof(struct tps6524x));
--
1.7.9.5

2014-02-20 09:02:53

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 17/23] regulator: tps6586x: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Mike Rapoport <[email protected]>
---
drivers/regulator/tps6586x-regulator.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 0485d47f0d8a..e36f3569767f 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -363,10 +363,8 @@ static struct tps6586x_platform_data *tps6586x_parse_regulator_dt(
}

pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- dev_err(&pdev->dev, "Memory alloction failed\n");
+ if (!pdata)
return NULL;
- }

for (i = 0; i < num; i++) {
int id;
@@ -420,10 +418,8 @@ static int tps6586x_regulator_probe(struct platform_device *pdev)

rdev = devm_kzalloc(&pdev->dev, TPS6586X_ID_MAX_REGULATOR *
sizeof(*rdev), GFP_KERNEL);
- if (!rdev) {
- dev_err(&pdev->dev, "Mmemory alloc failed\n");
+ if (!rdev)
return -ENOMEM;
- }

version = tps6586x_get_version(pdev->dev.parent);

--
1.7.9.5

2014-02-20 08:59:30

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 12/23] regulator: tps51632: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Laxman Dewangan <[email protected]>
---
drivers/regulator/tps51632-regulator.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c
index b3764f594ee9..f31f22e3e1bd 100644
--- a/drivers/regulator/tps51632-regulator.c
+++ b/drivers/regulator/tps51632-regulator.c
@@ -227,10 +227,8 @@ static struct tps51632_regulator_platform_data *
struct device_node *np = dev->of_node;

pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- dev_err(dev, "Memory alloc failed for platform data\n");
+ if (!pdata)
return NULL;
- }

pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node);
if (!pdata->reg_init_data) {
@@ -299,10 +297,8 @@ static int tps51632_probe(struct i2c_client *client,
}

tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
- if (!tps) {
- dev_err(&client->dev, "Memory allocation failed\n");
+ if (!tps)
return -ENOMEM;
- }

tps->dev = &client->dev;
tps->desc.name = client->name;
--
1.7.9.5

2014-02-20 09:03:50

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 14/23] regulator: tps6507x: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/tps6507x-regulator.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c
index e506e7f54253..98e66ce26723 100644
--- a/drivers/regulator/tps6507x-regulator.c
+++ b/drivers/regulator/tps6507x-regulator.c
@@ -380,10 +380,8 @@ static struct tps6507x_board *tps6507x_parse_dt_reg_data(

tps_board = devm_kzalloc(&pdev->dev, sizeof(*tps_board),
GFP_KERNEL);
- if (!tps_board) {
- dev_err(&pdev->dev, "Failure to alloc pdata for regulators.\n");
+ if (!tps_board)
return NULL;
- }

regulators = of_get_child_by_name(np, "regulators");
if (!regulators) {
@@ -406,10 +404,8 @@ static struct tps6507x_board *tps6507x_parse_dt_reg_data(

reg_data = devm_kzalloc(&pdev->dev, (sizeof(struct regulator_init_data)
* TPS6507X_NUM_REGULATOR), GFP_KERNEL);
- if (!reg_data) {
- dev_err(&pdev->dev, "Failure to alloc init data for regulators.\n");
+ if (!reg_data)
return NULL;
- }

tps_board->tps6507x_pmic_init_data = reg_data;

--
1.7.9.5

2014-02-20 08:59:25

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 11/23] regulator: s5m8767: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Sangbeom Kim <[email protected]>
---
drivers/regulator/s5m8767.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 4c356b872e6b..342a66ab654a 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -612,19 +612,13 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,

rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) *
pdata->num_regulators, GFP_KERNEL);
- if (!rdata) {
- dev_err(iodev->dev,
- "could not allocate memory for regulator data\n");
+ if (!rdata)
return -ENOMEM;
- }

rmode = devm_kzalloc(&pdev->dev, sizeof(*rmode) *
pdata->num_regulators, GFP_KERNEL);
- if (!rmode) {
- dev_err(iodev->dev,
- "could not allocate memory for regulator mode\n");
+ if (!rmode)
return -ENOMEM;
- }

pdata->regulators = rdata;
pdata->opmode = rmode;
--
1.7.9.5

2014-02-20 08:59:23

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 10/23] regulator: rc5t583: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Laxman Dewangan <[email protected]>
---
drivers/regulator/rc5t583-regulator.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/rc5t583-regulator.c b/drivers/regulator/rc5t583-regulator.c
index 22d6fd1281b1..4c414ae109ae 100644
--- a/drivers/regulator/rc5t583-regulator.c
+++ b/drivers/regulator/rc5t583-regulator.c
@@ -134,10 +134,8 @@ static int rc5t583_regulator_probe(struct platform_device *pdev)

regs = devm_kzalloc(&pdev->dev, RC5T583_REGULATOR_MAX *
sizeof(struct rc5t583_regulator), GFP_KERNEL);
- if (!regs) {
- dev_err(&pdev->dev, "Memory allocation failed exiting..\n");
+ if (!regs)
return -ENOMEM;
- }


for (id = 0; id < RC5T583_REGULATOR_MAX; ++id) {
--
1.7.9.5

2014-02-20 08:59:14

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 06/23] regulator: max77686: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/max77686.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index b411af00065d..de020adf0568 100644
--- a/drivers/regulator/max77686.c
+++ b/drivers/regulator/max77686.c
@@ -410,8 +410,6 @@ static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) *
pdata->num_regulators, GFP_KERNEL);
if (!rdata) {
- dev_err(&pdev->dev,
- "could not allocate memory for regulator data\n");
of_node_put(regulators_np);
return -ENOMEM;
}
--
1.7.9.5

2014-02-20 09:07:42

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 08/23] regulator: max8952: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/regulator/max8952.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index 788e5ae2af1b..66e777967c69 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -144,10 +144,8 @@ static struct max8952_platform_data *max8952_parse_dt(struct device *dev)
int i;

pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
- if (!pd) {
- dev_err(dev, "Failed to allocate platform data\n");
+ if (!pd)
return NULL;
- }

pd->gpio_vid0 = of_get_named_gpio(np, "max8952,vid-gpios", 0);
pd->gpio_vid1 = of_get_named_gpio(np, "max8952,vid-gpios", 1);
--
1.7.9.5

2014-02-20 09:09:11

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 04/23] regulator: fan53555: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Yunfan Zhang <[email protected]>
---
drivers/regulator/fan53555.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index a10df7d150cc..714fd9a89aa1 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -244,10 +244,9 @@ static int fan53555_regulator_probe(struct i2c_client *client,

di = devm_kzalloc(&client->dev, sizeof(struct fan53555_device_info),
GFP_KERNEL);
- if (!di) {
- dev_err(&client->dev, "Failed to allocate device info data!\n");
+ if (!di)
return -ENOMEM;
- }
+
di->regmap = devm_regmap_init_i2c(client, &fan53555_regmap_config);
if (IS_ERR(di->regmap)) {
dev_err(&client->dev, "Failed to allocate regmap!\n");
--
1.7.9.5

2014-02-20 10:58:09

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 01/23] regulator: da9063: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:01PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 10:59:13

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 02/23] regulator: da9210: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:02PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:20:18

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 03/23] regulator: dbx500: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:03PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:21:41

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 04/23] regulator: fan53555: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:04PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:22:11

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 06/23] regulator: max77686: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:06PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:23:11

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 05/23] regulator: fixed: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:05PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:23:48

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 07/23] regulator: max8907: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:07PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:24:39

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 08/23] regulator: max8952: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:08PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:25:39

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 09/23] regulator: max8997: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:09PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:26:34

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 10/23] regulator: rc5t583: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:10PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:49:33

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 11/23] regulator: s5m8767: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:11PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:50:43

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 12/23] regulator: tps51632: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:12PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:51:39

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 13/23] regulator: tps62360: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:13PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:52:48

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 14/23] regulator: tps6507x: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:14PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:54:19

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 15/23] regulator: tps65090: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:15PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:55:58

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 16/23] regulator: tps6524x: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:16PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 11:57:41

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 17/23] regulator: tps6586x: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:17PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 12:01:57

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 18/23] regulator: tps65910: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:18PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 12:02:51

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 19/23] regulator: tps80031: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:19PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 12:03:39

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 20/23] regulator: wm831x-dcdc: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:20PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 12:04:06

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 21/23] regulator: wm831x-isink: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:21PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2014-02-20 12:04:31

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 22/23] regulator: wm831x-ldo: Remove redundant error message

On Thu, Feb 20, 2014 at 02:23:22PM +0530, Sachin Kamat wrote:
> kzalloc prints its own OOM message upon failure.

Applied, thanks.


Attachments:
(No filename) (131.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments