diff mbox

usb: xhci: tegra: fix runtime PM error handling

Message ID 20180617111258.13447-1-stefan@agner.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Stefan Agner June 17, 2018, 11:12 a.m. UTC
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")
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 drivers/usb/host/xhci-tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jon Hunter June 19, 2018, 10:07 a.m. UTC | #1
On 17/06/18 12:12, Stefan Agner wrote:
> 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")
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  drivers/usb/host/xhci-tegra.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
> index a8c1d073cba0..33daac4136e8 100644
> --- a/drivers/usb/host/xhci-tegra.c
> +++ b/drivers/usb/host/xhci-tegra.c
> @@ -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);
> 

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Thanks for fixing!
Jon
diff mbox

Patch

diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index a8c1d073cba0..33daac4136e8 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -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);