[PATCH 1/3] phy: mapphone-mdm6600: Fix runtime disable on probe

Sebastian Reichel sebastian.reichel at collabora.com
Tue Sep 12 08:00:49 PDT 2023


Hi,

On Mon, Sep 11, 2023 at 06:54:55AM +0300, Tony Lindgren wrote:
> Commit d644e0d79829 ("phy: mapphone-mdm6600: Fix PM error handling in
> phy_mdm6600_probe") caused a regression where we now unconditionally
> disable runtime PM at the end of the probe while it is only needed on
> errors.
> 
> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75 at gmail.com>
> Cc: Merlijn Wajer <merlijn at wizzup.org>
> Cc: Miaoqian Lin <linmq006 at gmail.com>
> Cc: Pavel Machek <pavel at ucw.cz>
> Cc: Sebastian Reichel <sre at kernel.org>
> Fixes: d644e0d79829 ("phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe")
> Signed-off-by: Tony Lindgren <tony at atomide.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.com>

-- Sebastian

>  drivers/phy/motorola/phy-mapphone-mdm6600.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
> --- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
> +++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
> @@ -627,10 +627,12 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
>  	pm_runtime_put_autosuspend(ddata->dev);
>  
>  cleanup:
> -	if (error < 0)
> +	if (error < 0) {
>  		phy_mdm6600_device_power_off(ddata);
> -	pm_runtime_disable(ddata->dev);
> -	pm_runtime_dont_use_autosuspend(ddata->dev);
> +		pm_runtime_disable(ddata->dev);
> +		pm_runtime_dont_use_autosuspend(ddata->dev);
> +	}
> +
>  	return error;
>  }
>  
> -- 
> 2.42.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-phy/attachments/20230912/24d44d97/attachment-0001.sig>


More information about the linux-phy mailing list