diff options
| author | Alexis Lothoré <[email protected]> | 2025-05-29 09:07:24 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-05-31 02:33:29 +0000 |
| commit | cbefe2ffa7784525ec5d008ba87c7add19ec631a (patch) | |
| tree | 396898f1fee231d9297268517801cba5417b21f0 /net/core/utils.c | |
| parent | net: stmmac: make sure that ptp_rate is not 0 before configuring timestamping (diff) | |
| download | kernel-cbefe2ffa7784525ec5d008ba87c7add19ec631a.tar.gz kernel-cbefe2ffa7784525ec5d008ba87c7add19ec631a.zip | |
net: stmmac: make sure that ptp_rate is not 0 before configuring EST
If the ptp_rate recorded earlier in the driver happens to be 0, this
bogus value will propagate up to EST configuration, where it will
trigger a division by 0.
Prevent this division by 0 by adding the corresponding check and error
code.
Suggested-by: Maxime Chevallier <[email protected]>
Signed-off-by: Alexis Lothoré <[email protected]>
Fixes: 8572aec3d0dc ("net: stmmac: Add basic EST support for XGMAC")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/utils.c')
0 files changed, 0 insertions, 0 deletions
