Skip to contentSkip to conversation

regulator: gpio-regulator: Remove unneeded OOM error message

PATCH Applied Fabio Estevam 2 participants 2 messages Jan 24, 2014 – Jan 27, 2014 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: gpio-regulator: Remove unneeded OOM error message

From: Fabio Estevam <[email protected]>

There is no need to print an OOM message after devm_kzalloc, since there is a generic OOM message in place.

---
 drivers/regulator/gpio-regulator.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/regulator/gpio-regulator.c +1 -3
index c0a1d00..bad44f3 100644
@@ -239,10 +239,8 @@ static int gpio_regulator_probe(struct platform_device *pdev)
 
 	drvdata = devm_kzalloc(&pdev->dev, sizeof(struct gpio_regulator_data),
 			       GFP_KERNEL);
-	if (drvdata == NULL) {
-		dev_err(&pdev->dev, "Failed to allocate device data\n");
+	if (drvdata == NULL)
 		return -ENOMEM;
-	}
 
 	drvdata->desc.name = kstrdup(config->supply_name, GFP_KERNEL);
 	if (drvdata->desc.name == NULL) {
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need to print an OOM message after devm_kzalloc, since there is a generic OOM message in place.

Applied, thanks.