Commit d90d0c17 authored by Kai-Heng Feng's avatar Kai-Heng Feng Committed by David S. Miller
Browse files

net: stmmac: Fix "Unbalanced pm_runtime_enable!" warning



If the device is PCI based like intel-eth-pci, pm_runtime_enable() is
already called by pci_pm_init().

So only pm_runtime_enable() when it's not already enabled.

Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 99218cbf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7159,6 +7159,7 @@ int stmmac_dvr_probe(struct device *device,

	pm_runtime_get_noresume(device);
	pm_runtime_set_active(device);
	if (!pm_runtime_enabled(device))
		pm_runtime_enable(device);

	if (priv->hw->pcs != STMMAC_PCS_TBI &&