Messages in this thread | | | Date | Mon, 16 Nov 2020 09:45:38 -0800 | From | Jakub Kicinski <> | Subject | Re: [PATCH net] net: phy: smsc: add missed clk_disable_unprepare in smsc_phy_probe() |
| |
On Mon, 16 Nov 2020 10:26:07 +0100 Marco Felsch wrote: > > > The code right above looks highly questionable as well: > > > > > > priv->refclk = clk_get_optional(dev, NULL); > > > if (IS_ERR(priv->refclk)) > > > dev_err_probe(dev, PTR_ERR(priv->refclk), "Failed to request clock\n"); > > > > > > ret = clk_prepare_enable(priv->refclk); > > > if (ret) > > > return ret; > > > > > > I don't think clk_prepare_enable() will be too happy to see an error > > > pointer. This should probably be: > > > > > > priv->refclk = clk_get_optional(dev, NULL); > > > if (IS_ERR(priv->refclk)) > > > return dev_err_probe(dev, PTR_ERR(priv->refclk), > > > "Failed to request clock\n"); > > > > Right, especially if EPROBE_DEFER must be returned because the clock > > provider is not ready yet, we should have a chance to do that. > > damn.. I missed the return here. Thanks for covering that. Should I send > a fix or did you do that already?
Please do, I don't see any fix for this issue in patchwork right now.
| |