PM / devfreq: exynos-ppmu: Delete an error message for a failed memory allocation...
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 13 Feb 2018 21:10:42 +0000 (22:10 +0100)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:58:23 +0000 (14:58 +0900)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Change-Id: I25ee724ab3da80f54f339c4ed54bb7bf3c30dbc8
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
[cw00.choi: Backported from mainline kernel]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/event/exynos-ppmu.c

index 756c848..74b7942 100644 (file)
@@ -633,11 +633,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);