]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec_ptp: add clock rate zero check
authorFugang Duan <fugang.duan@nxp.com>
Wed, 16 Jun 2021 09:14:25 +0000 (17:14 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jun 2021 19:39:03 +0000 (12:39 -0700)
commitcb3cefe3f3f8af27c6076ef7d1f00350f502055d
tree0248ddfa4289a40dd5208ff80186e59441cba267
parent56b786d86694e079d8aad9b314e015cd4ac02a3d
net: fec_ptp: add clock rate zero check

Add clock rate zero check to fix coverity issue of "divide by 0".

Fixes: commit 85bd1798b24a ("net: fec: fix spin_lock dead lock")
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_ptp.c