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

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
......@@ -7159,7 +7159,8 @@ int stmmac_dvr_probe(struct device *device,
pm_runtime_get_noresume(device);
pm_runtime_set_active(device);
pm_runtime_enable(device);
if (!pm_runtime_enabled(device))
pm_runtime_enable(device);
if (priv->hw->pcs != STMMAC_PCS_TBI &&
priv->hw->pcs != STMMAC_PCS_RTBI) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment