Skip to contentSkip to conversation

usb: xhci: tegra: fix runtime PM error handling

PATCH New Mathias Nyman 1 participant 1 message Jun 21, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/5 usb: xhci: tegra: fix runtime PM error handling

From: Stefan Agner <[email protected]>

The address-of operator will always evaluate to true. However, power should be explicitly disabled if no power domain is used.

Remove the address-of operator.

Fixes 58c38116c6cc ("usb: xhci: tegra: Add support for managing powergates")
---
 drivers/usb/host/xhci-tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/xhci-tegra.c +2 -2
index d50549f..4b463e5 100644
@@ -1223,10 +1223,10 @@ static int tegra_xusb_probe(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 	usb_put_hcd(tegra->hcd);
 disable_xusbc:
-	if (!&pdev->dev.pm_domain)
+	if (!pdev->dev.pm_domain)
 		tegra_powergate_power_off(TEGRA_POWERGATE_XUSBC);
 disable_xusba:
-	if (!&pdev->dev.pm_domain)
+	if (!pdev->dev.pm_domain)
 		tegra_powergate_power_off(TEGRA_POWERGATE_XUSBA);
 put_padctl:
 	tegra_xusb_padctl_put(tegra->padctl);