Commit b93fb44
ixgbe: fix pci device refcount leak
As the comment of pci_get_domain_bus_and_slot() says, it
returns a PCI device with refcount incremented, when finish
using it, the caller must decrement the reference count by
calling pci_dev_put().
In ixgbe_get_first_secondary_devfn() and ixgbe_x550em_a_has_mii(),
pci_dev_put() is called to avoid leak.
Fixes: 8fa10ef ("ixgbe: register a mdiobus")
Signed-off-by: Yang Yingliang <[email protected]>
Tested-by: Gurucharan G <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>1 parent 53da7ae commit b93fb44
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
| 858 | + | |
858 | 859 | | |
859 | 860 | | |
860 | 861 | | |
| 862 | + | |
861 | 863 | | |
862 | 864 | | |
863 | 865 | | |
| |||
874 | 876 | | |
875 | 877 | | |
876 | 878 | | |
| 879 | + | |
877 | 880 | | |
878 | 881 | | |
879 | 882 | | |
| |||
884 | 887 | | |
885 | 888 | | |
886 | 889 | | |
887 | | - | |
888 | | - | |
889 | | - | |
| 890 | + | |
| 891 | + | |
890 | 892 | | |
891 | 893 | | |
892 | 894 | | |
893 | | - | |
| 895 | + | |
894 | 896 | | |
895 | | - | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
896 | 900 | | |
897 | 901 | | |
898 | 902 | | |
| |||
0 commit comments