summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/rocker/rocker.c
diff options
context:
space:
mode:
authorScott Feldman <sfeldma@gmail.com>2015-08-04 07:31:17 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-07 06:47:57 +0200
commit6c4f7780a5dd6773a653c87bf7ee61c6aea6a4e7 (patch)
tree626ac79b04c0d5a161cb6f503ea8ca3fab039984 /drivers/net/ethernet/rocker/rocker.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next (diff)
downloadlinux-6c4f7780a5dd6773a653c87bf7ee61c6aea6a4e7.tar.xz
linux-6c4f7780a5dd6773a653c87bf7ee61c6aea6a4e7.zip
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: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/rocker/rocker.c')
-rw-r--r--drivers/net/ethernet/rocker/rocker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 4cd5a71ad45e..5309d1fd8eb3 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -5008,6 +5008,7 @@ err_untagged_vlan:
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);