Message ID | e4d3a870-f420-5a06-1665-59152c1924a3@users.sourceforge.net (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On 2018년 02월 14일 06:17, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > 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. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/devfreq/event/exynos-ppmu.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c > index d96e3dc71cf8..72ac9113500d 100644 > --- a/drivers/devfreq/event/exynos-ppmu.c > +++ b/drivers/devfreq/event/exynos-ppmu.c > @@ -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); > > Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
> On 2018년 02월 14일 06:17, SF Markus Elfring wrote: > > From: Markus Elfring <elfring@users.sourceforge.net> > > 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. > > > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > > --- > > drivers/devfreq/event/exynos-ppmu.c | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c > > index d96e3dc71cf8..72ac9113500d 100644 > > --- a/drivers/devfreq/event/exynos-ppmu.c > > +++ b/drivers/devfreq/event/exynos-ppmu.c > > @@ -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); > > > > > > Acked-by: Chanwoo Choi <cw00.choi@samsung.com> > Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index d96e3dc71cf8..72ac9113500d 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -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);