Skip to content
Commit 2a5af404 authored by Sean Anderson's avatar Sean Anderson Committed by Tom Rini
Browse files

net: dsa: Fix segmentation fault if master fails to probe



If the DSA master fails to probe for whatever reason, then DSA devices
will continue on as if nothing is wrong. This can cause incorrect
behavior. In particular, on sandbox, dsa_sandbox_probe attempts to
access the master's private data. This is only safe to do if the master
has been probed first. Fix this by probing the master after we look it
up, and bailing out if we get an error.

Fixes: fc054d56 ("net: Introduce DSA class for Ethernet switches")
Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
parent e844e5d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment