From: Scott Feldman Date: Tue, 4 Aug 2015 05:31:17 +0000 (-0700) Subject: rocker: NULL port if port probe fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6c4f7780a5dd6773a653c87bf7ee61c6aea6a4e7;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: David S. Miller --- 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);