Commit 3c1766b
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: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent a073d59 commit 3c1766b
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3370 | 3370 | | |
3371 | 3371 | | |
3372 | 3372 | | |
3373 | | - | |
| 3373 | + | |
3374 | 3374 | | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
3375 | 3378 | | |
3376 | 3379 | | |
3377 | 3380 | | |
3378 | 3381 | | |
3379 | | - | |
| 3382 | + | |
3380 | 3383 | | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
3381 | 3387 | | |
3382 | 3388 | | |
3383 | 3389 | | |
| |||
0 commit comments