]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:49:35 +0000 (08:49 -0400)
commitd35c6cec87ae26ff982a2ffbbc34989e659cb825
tree731dc5caeeead99a920ce139f8e719091a19a040
parent9bdaa15711fade6eab36263b33b35cdc09661c53
net: fec_ptp: add clock rate zero check

commit cb3cefe3f3f8af27c6076ef7d1f00350f502055d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/fec_ptp.c