Skip to content

Commit

Permalink
rocker: NULL port if port probe fails
Browse files Browse the repository at this point in the history
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: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Scott Feldman authored and David S. Miller committed Aug 7, 2015
1 parent 9dc20a6 commit 6c4f778
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/rocker/rocker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_OP_FLAG_REMOVE);
err_port_ig_tbl:
rocker->ports[port_number] = NULL;
unregister_netdev(dev);
err_register_netdev:
free_netdev(dev);
Expand Down

0 comments on commit 6c4f778

Please sign in to comment.