[PATCH v5 04/10] coresight: Appropriately disable programming clocks
Mark Brown
broonie at kernel.org
Mon Jul 28 09:44:59 PDT 2025
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250728/a7ed4243/attachment.sig>
More information about the linux-arm-kernel
mailing list