Skip to content
Commit cd5afa91 authored by Harini Katakam's avatar Harini Katakam Committed by David S. Miller
Browse files

net: macb: Add null check for PCLK and HCLK



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: default avatarHarini Katakam <harini.katakam@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06acc17a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment