diff options
author | Daniel Golle <daniel@makrotopia.org> | 2023-08-21 17:12:44 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-08-22 10:59:49 -0700 |
commit | 604204fcb321abe81238551936ecda5269e81076 (patch) | |
tree | efd1f9292521cf4ece2f49c2e53c846d7e82560b /net | |
parent | 99b415fe8986803ba0eaf6b8897b16edc8fe7ec2 (diff) |
net: ethernet: mtk_eth_soc: fix NULL pointer on hw reset
When a hardware reset is triggered on devices not initializing WED the
calls to mtk_wed_fe_reset and mtk_wed_fe_reset_complete dereference a
pointer on uninitialized stack memory.
Break out of both functions in case a hw_list entry is 0.
Fixes: 08a764a7c51b ("net: ethernet: mtk_wed: add reset/reset_complete callbacks")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/5465c1609b464cc7407ae1530c40821dcdf9d3e6.1692634266.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions