Files
linux/drivers/net/ethernet/cadence
Harini Katakam 670588f2eb net: macb: Add null check for PCLK and HCLK
[ Upstream commit cd5afa91f0 ]

Both PCLK and HCLK are "required" clocks according to macb devicetree
documentation. There is a chance that devm_clk_get doesn't return a
negative error but just a NULL clock structure instead. In such a case
the driver proceeds as usual and uses pclk value 0 to calculate MDC
divisor which is incorrect. Hence fix the same in clock initialization.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
2019-05-04 09:15:20 +02:00
..
2017-06-30 13:11:42 -04:00