Skip to content

Commit

Permalink
net: hns3: add a missing uninit debugfs when unload driver
Browse files Browse the repository at this point in the history
When unloading driver, if flag HNS3_NIC_STATE_INITED has been
already cleared, the debugfs will not be uninitialized, so fix it.

Fixes: b229236 ("net: hns3: Add debugfs framework registration")
Signed-off-by: Huazhong Tan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Huazhong Tan authored and davem330 committed Jul 6, 2020
1 parent cddd564 commit e22b5e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -4127,9 +4127,8 @@ static void hns3_client_uninit(struct hnae3_handle *handle, bool reset)

hns3_put_ring_config(priv);

hns3_dbg_uninit(handle);

out_netdev_free:
hns3_dbg_uninit(handle);
free_netdev(netdev);
}

Expand Down

0 comments on commit e22b5e7

Please sign in to comment.