Home
last modified time | relevance | path

Searched hist:bced870152161435cc59a53e77f3699f8e8f22ca (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/phy/
H A Dmicrel.cdiff bced870152161435cc59a53e77f3699f8e8f22ca Tue May 12 02:43:14 CDT 2015 Niklas Cassel <niklas.cassel@axis.com> net: phy: micrel: Fix regression in kszphy_probe

Don't do clock-mode-select if clk == NULL,
since when building without CONFIG_HAVE_CLK,
clk_get returns NULL and clk_get_rate returns 0.

Doing clock-mode-select in this cause causes kszphy_probe to
return -EINVAL and thus prevents the device from being probed.

The original code (before regression) would return 0
when building without CONFIG_HAVE_CLK.

Cc: stable <stable@vger.kernel.org> # 3.18+
Fixes: 1fadee0c3645 ("net/phy: micrel: Add clock support for
KSZ8021/KSZ8031")
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Niklas Cassel <niklass@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>