diff options
author | Zhu Yanjun <yanjun.zhu@oracle.com> | 2017-08-15 02:33:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-15 16:46:48 -0700 |
commit | e084a8b89c173d7b37e886b277b6d3e05669259a (patch) | |
tree | 67b52cc847fbaa06a446d7154495bcaaf5bb5568 /drivers/net/ethernet/mellanox/mlx4/main.c | |
parent | dc503a8ad98474ea0073a1c5c4d9f18cb8dd0dbf (diff) | |
download | linux-stable-e084a8b89c173d7b37e886b277b6d3e05669259a.tar.gz linux-stable-e084a8b89c173d7b37e886b277b6d3e05669259a.tar.bz2 linux-stable-e084a8b89c173d7b37e886b277b6d3e05669259a.zip |
mlx4: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not necessary to manually clear the
device driver data to NULL.
Cc: Joe Jin <joe.jin@oracle.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 09b9bc17bce9..df9b0efb5ab1 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3782,7 +3782,6 @@ err_release_regions: err_disable_pdev: mlx4_pci_disable_device(&priv->dev); - pci_set_drvdata(pdev, NULL); return err; } @@ -3997,7 +3996,6 @@ static void mlx4_remove_one(struct pci_dev *pdev) devlink_unregister(devlink); kfree(dev->persist); devlink_free(devlink); - pci_set_drvdata(pdev, NULL); } static int restore_current_port_types(struct mlx4_dev *dev, |