From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>,
Linus Walleij <linus.walleij@linaro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Hulk Robot <hulkci@huawei.com>, Yuan Can <yuancan@huawei.com>
Subject: Re: [PATCH] gpio: pxa: use devres for the clock struct
Date: Sat, 20 Aug 2022 01:14:57 +0300 [thread overview]
Message-ID: <CAHp75Vc3dazcM1MLzjzPUmgMGNACUsOZ8aK4uauAJk0hzj9q-w@mail.gmail.com> (raw)
In-Reply-To: <20220815091929.130547-1-brgl@bgdev.pl>
On Mon, Aug 15, 2022 at 12:26 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> The clock is never released after probe(). Use devres to not leak
> resources.
...
> - clk = clk_get(&pdev->dev, NULL);
> + clk = devm_clk_get_enabled(&pdev->dev, NULL);
> if (IS_ERR(clk)) {
> dev_err(&pdev->dev, "Error %ld to get gpio clock\n",
> PTR_ERR(clk));
> return PTR_ERR(clk);
Shouldn't we fix a potential log saturation issue first (by switching
to use dev_err_probe() helper)?
> }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-08-19 22:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 9:19 [PATCH] gpio: pxa: use devres for the clock struct Bartosz Golaszewski
2022-08-16 21:08 ` Linus Walleij
2022-08-19 22:14 ` Andy Shevchenko [this message]
2022-08-26 8:20 ` Linus Walleij
2022-08-26 12:18 ` Christophe JAILLET
2022-08-27 12:35 ` Marion & Christophe JAILLET
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=CAHp75Vc3dazcM1MLzjzPUmgMGNACUsOZ8aK4uauAJk0hzj9q-w@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=hulkci@huawei.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
--cc=yuancan@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).