public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Qing Wang <wangqing@vivo.com>, Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: phy: add missing put_device() call in tegra_usb_phy_parse_pmc()
Date: Tue, 7 Dec 2021 17:11:30 +0300	[thread overview]
Message-ID: <768ced18-9e47-df7d-786e-dced5f06b0e7@gmail.com> (raw)
In-Reply-To: <1638881794-3361-1-git-send-email-wangqing@vivo.com>

07.12.2021 15:56, Qing Wang пишет:
> From: Wang Qing <wangqing@vivo.com>
> 
> of_find_device_by_node() takes a reference to the embedded struct device 
> which needs to be dropped when error return.
> 
> Add a jump target to fix the exception handling for this 
> function implementation.
> 
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
>  drivers/usb/phy/phy-tegra-usb.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
> index 68cd4b6..5678b7f
> --- a/drivers/usb/phy/phy-tegra-usb.c
> +++ b/drivers/usb/phy/phy-tegra-usb.c
> @@ -1300,18 +1300,26 @@ static int tegra_usb_phy_parse_pmc(struct device *dev,
>  	err = devm_add_action_or_reset(dev, tegra_usb_phy_put_pmc_device,
>  				       &pmc_pdev->dev);

This devm_add_action_or_reset() takes care of dropping the reference.
This patch is incorrect.

      reply	other threads:[~2021-12-07 14:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 12:56 [PATCH] usb: phy: add missing put_device() call in tegra_usb_phy_parse_pmc() Qing Wang
2021-12-07 14:11 ` Dmitry Osipenko [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=768ced18-9e47-df7d-786e-dced5f06b0e7@gmail.com \
    --to=digetx@gmail.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=wangqing@vivo.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