Re: [PATCH] gpio: pxa: use devres for the clock struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 15, 2022 at 12:26 PM Bartosz Golaszewski <brgl@xxxxxxxx> 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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux