Re: [PATCH v5 04/10] coresight: Appropriately disable programming clocks
From: Mark Brown
Date: Mon Jul 28 2025 - 12:45:09 EST
On Thu, Jul 24, 2025 at 04:22:34PM +0100, Leo Yan wrote:
> static inline struct clk *coresight_get_enable_apb_pclk(struct device *dev)
> {
> struct clk *pclk;
> - int ret;
>
> - pclk = clk_get(dev, "apb_pclk");
> - if (IS_ERR(pclk)) {
> - pclk = clk_get(dev, "apb");
> - if (IS_ERR(pclk))
> - return NULL;
> - }
Previously we would return NULL for any error (which isn't super great
for deferred probe but never mind).
> + pclk = devm_clk_get_enabled(dev, "apb_pclk");
> + if (IS_ERR(pclk))
> + pclk = devm_clk_get_enabled(dev, "apb");
...
> return pclk;
> }
Now we pass errors back to the caller, making missing clocks fatal.
Attachment:
signature.asc
Description: PGP signature