Skip to content

Commit

Permalink
PM / devfreq: exynos-ppmu: Delete an error message for a failed memor…
Browse files Browse the repository at this point in the history
…y allocation in exynos_ppmu_probe()

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>
  • Loading branch information
elfring authored and myungjoo committed Jul 18, 2018
1 parent 9d3cce1 commit 12ba2c6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/devfreq/event/exynos-ppmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 12ba2c6

Please sign in to comment.