mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: xiakaixu1987@gmail.com
Cc: kishon@ti.com, linux-kernel@vger.kernel.org,
	Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [PATCH v2] phy: mapphone-mdm6600: return error when timed out powering up
Date: Mon, 16 Nov 2020 15:12:27 +0530	[thread overview]
Message-ID: <20201116094227.GS7499@vkoul-mobl> (raw)
In-Reply-To: <1605517891-20357-1-git-send-email-kaixuxia@tencent.com>

On 16-11-20, 17:11, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
> 
> The value of variable error is overwritten by the following call
> devm_request_threaded_irq() in phy_mdm6600_device_power_on(), actually
> we should return error when timed out powering up.
> 
> Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> ---
> v2:
>  -directly return error when timed out powering.
> 
>  drivers/phy/motorola/phy-mapphone-mdm6600.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
> index 5172971f4c36..2f461c0d7276 100644
> --- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
> +++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
> @@ -423,6 +423,7 @@ static int phy_mdm6600_device_power_on(struct phy_mdm6600 *ddata)
>  		ddata->enabled = false;
>  		error = -ETIMEDOUT;

or drop this
>  		dev_err(ddata->dev, "Timed out powering up\n");
> +		return error;

and do:
                return -ETIMEDOUT;


>  	}
>  
>  	/* Reconfigure mode1 GPIO as input for OOB wake */
> -- 
> 2.20.0

-- 
~Vinod

      reply	other threads:[~2020-11-16 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16  9:11 xiakaixu1987
2020-11-16  9:42 ` Vinod Koul [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201116094227.GS7499@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=kaixuxia@tencent.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiakaixu1987@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®