From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [bug report] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver
Date: Wed, 12 Jul 2017 10:34:29 +0100 [thread overview]
Message-ID: <20170712093428.GB7472@leverpostej> (raw)
In-Reply-To: <CACgAJHyNp25-Gf+mX0L5z3nt7atrowpooE6mUTGtY1dc_3nZXQ@mail.gmail.com>
Hi,
On Tue, Jul 11, 2017 at 03:48:06PM -0700, Tai Tri Nguyen wrote:
> On Tue, Jul 11, 2017 at 4:43 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > The patch 832c927d119b: "perf: xgene: Add APM X-Gene SoC Performance
> > Monitoring Unit driver" from Jul 15, 2016, leads to the following
> > static checker warning:
> >
> > drivers/perf/xgene_pmu.c:1922 xgene_pmu_probe()
> > warn: 'xgene_pmu->pcppmu_csr' is an error pointer or valid
> > 1869 if (IS_ERR(xgene_pmu->pcppmu_csr)) {
> > 1870 dev_err(&pdev->dev, "ioremap failed for PCP PMU resource\n");
> > 1871 rc = PTR_ERR(xgene_pmu->pcppmu_csr);
> > 1872 goto err;
> > ^^^^^^^^
> > If we hit this goto then the kernel will crash.
> >
> > 1873 }
> >
> > [ snip ]
> >
> > 1916 /* Enable interrupt */
> > 1917 xgene_pmu->ops->unmask_int(xgene_pmu);
> > 1918
> > 1919 return 0;
> > 1920
> > 1921 err:
> > 1922 if (xgene_pmu->pcppmu_csr)
> > 1923 devm_iounmap(&pdev->dev, xgene_pmu->pcppmu_csr);
> > 1924 devm_kfree(&pdev->dev, xgene_pmu);
> >
> > Can't we remove all this cleanup since it's devm_ managed resources?
>
> Yes, you are right.
> We can remove all this cleanup and also others because these managed
> resources are automatically freed/unmapped on driver detach.
>
> Hi Mark,
>
> If you agree, I can post a patch to fix the issue.
Yes please.
Mark.
next prev parent reply other threads:[~2017-07-12 9:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 11:43 [bug report] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Dan Carpenter
2017-07-11 22:48 ` Tai Tri Nguyen
2017-07-12 9:34 ` Mark Rutland [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-10-12 11:32 Dan Carpenter
2016-10-12 14:55 ` Mason
2016-10-12 15:23 ` Mark Rutland
2016-10-12 15:28 ` Tai Tri Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170712093428.GB7472@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox