Messages in this thread | | | Date | Tue, 24 Apr 2018 18:32:53 +0100 | From | Mark Brown <> | Subject | Re: [PATCH v2] spi/bcm63xx-hspi: Enable the clock before calling clk_get_rate(). |
| |
On Tue, Apr 24, 2018 at 06:16:05PM +0200, Stefan Potyra wrote:
> + ret = clk_prepare_enable(clk); > + if (ret) > + return ret; > + > rate = clk_get_rate(clk); > if (!rate) { > struct clk *pll_clk = devm_clk_get(dev, "pll"); > @@ -364,10 +368,6 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) > return -EINVAL; > } > > - ret = clk_prepare_enable(clk); > - if (ret) > - return ret; > -
We can return an error after the clock was enabled, this will leake the clock if that happens. [unhandled content-type:application/pgp-signature] | |