Commit 0fcfc7a1 authored by Vasundhara Volam's avatar Vasundhara Volam Committed by David S. Miller
Browse files

bnxt_en: Call devlink_port_type_clear() in remove()



Similar to other drivers, properly clear the devlink port type when
removing the device before unregistration.

Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a707bed
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -11429,6 +11429,8 @@ static void bnxt_remove_one(struct pci_dev *pdev)
		bnxt_sriov_disable(bp);

	bnxt_dl_fw_reporters_destroy(bp, true);
	if (BNXT_PF(bp))
		devlink_port_type_clear(&bp->dl_port);
	pci_disable_pcie_error_reporting(pdev);
	unregister_netdev(dev);
	bnxt_dl_unregister(bp);