Skip to contentSkip to conversation

PM / devfreq: exynos-ppmu: Delete an error message for a failed memory allocation in exynos_ppmu_probe()

PATCH In review SF Markus Elfring 3 participants 3 messages Feb 13, 2018 – Feb 22, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PM / devfreq: exynos-ppmu: Delete an error message for a failed memory allocation in exynos_ppmu_probe()

From: Markus Elfring <[email protected]>
Date: Tue, 13 Feb 2018 22:10:42 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/devfreq/event/exynos-ppmu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/devfreq/event/exynos-ppmu.c +2 -4
index d96e3dc71cf8..72ac9113500d 100644
@@ -627,11 +627,9 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
 
 	size = sizeof(struct devfreq_event_dev *) * info->num_events;
 	info->edev = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
-	if (!info->edev) {
-		dev_err(&pdev->dev,
-			"failed to allocate memory devfreq-event devices\n");
+	if (!info->edev)
 		return -ENOMEM;
-	}
+
 	edev = info->edev;
 	platform_set_drvdata(pdev, info);
 
Signature · 1 line
2.16.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Tue, 13 Feb 2018 22:10:42 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/devfreq/event/exynos-ppmu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/devfreq/event/exynos-ppmu.c +0 -0
index d96e3dc71cf8..72ac9113500d 100644
@@ -627,11 +627,9 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
 
 	size = sizeof(struct devfreq_event_dev *) * info->num_events;
 	info->edev = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);

drivers/devfreq/event/exynos-ppmu.c static int exynos_ppmu_probe(struct platform_device *pdev) · line 635

Quoted 10 lines
drivers/devfreq/event/exynos-ppmu.c +2 -4
-	if (!info->edev) {
-		dev_err(&pdev->dev,
-			"failed to allocate memory devfreq-event devices\n");
+	if (!info->edev)
 		return -ENOMEM;
-	}
+
 	edev = info->edev;
 	platform_set_drvdata(pdev, info);
 
Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics
maintainer Acked-by
#2 lore raw
Quoted 19 lines · SF Markus Elfring
Quoted 18 lines

From: Markus Elfring <[email protected]>
Date: Tue, 13 Feb 2018 22:10:42 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/devfreq/event/exynos-ppmu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/devfreq/event/exynos-ppmu.c +0 -0
index d96e3dc71cf8..72ac9113500d 100644
@@ -627,11 +627,9 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
 
Quoted 16 lines

drivers/devfreq/event/exynos-ppmu.c static int exynos_ppmu_probe(struct platform_device *pdev) · line 635

Quoted 13 lines
drivers/devfreq/event/exynos-ppmu.c +2 -4
 	size = sizeof(struct devfreq_event_dev *) * info->num_events;
 	info->edev = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
-	if (!info->edev) {
-		dev_err(&pdev->dev,
-			"failed to allocate memory devfreq-event devices\n");
+	if (!info->edev)
 		return -ENOMEM;
-	}
+
 	edev = info->edev;
 	platform_set_drvdata(pdev, info);