]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
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)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 18 Jul 2018 04:56:46 +0000 (13:56 +0900)
Omit 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 <elfring@users.sourceforge.net>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/event/exynos-ppmu.c

index 3cd6a184fe7cfcb01b0bada99d73cac19d9c23b4..a9c64f0d328466335e0a096606198e08541714ac 100644 (file)
@@ -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);