PM / devfreq: exynos-ppmu: Delete an error message for a failed memory allocation in exynos_ppmu_probe()
Subsystems (4)
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
@@ -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
Quoted 21 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Tue, 13 Feb 2018 22:10:42 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>--- drivers/devfreq/event/exynos-ppmu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/devfreq/event/exynos-ppmu.c +0
-0@@ -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
Quoted 19 lines · SF Markus Elfring
Quoted 18 lines
From: Markus Elfring <[email protected]>
Date: Tue, 13 Feb 2018 22:10:42 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>--- drivers/devfreq/event/exynos-ppmu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/devfreq/event/exynos-ppmu.c +0
-0@@ -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
-4size =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);Acked-by Chanwoo Choi <[email protected]>