Commit 6c4f7780 authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller

rocker: NULL port if port probe fails

Set port to NULL if port probe fails so we don't try to remove partially
initialized port on port probe err cleanup path.
Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9dc20a64
...@@ -5008,6 +5008,7 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number) ...@@ -5008,6 +5008,7 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
rocker_port_ig_tbl(rocker_port, SWITCHDEV_TRANS_NONE, rocker_port_ig_tbl(rocker_port, SWITCHDEV_TRANS_NONE,
ROCKER_OP_FLAG_REMOVE); ROCKER_OP_FLAG_REMOVE);
err_port_ig_tbl: err_port_ig_tbl:
rocker->ports[port_number] = NULL;
unregister_netdev(dev); unregister_netdev(dev);
err_register_netdev: err_register_netdev:
free_netdev(dev); free_netdev(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment