Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Jyri Sarha <jsarha@ti.com>
Cc: Vinod Koul <vkoul@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	Tanmay Patil <t-patil@ti.com>,
	linux-phy@lists.infradead.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] phy: ti: phy-j721e-wiz: fix reference leaks in wiz_probe()
Date: Fri, 23 Sep 2022 11:58:01 +0300	[thread overview]
Message-ID: <d3b8754e-f888-5bef-c6c3-16c42c598421@kernel.org> (raw)
In-Reply-To: <YyxFI8aW23IC/21U@kili>



On 22/09/2022 14:21, Dan Carpenter wrote:
> These two error paths need to call of_node_put(child_node) before
> returning.
> 
> Fixes: edd473d4293a ("phy: ti: phy-j721e-wiz: add support for j7200-wiz-10g")
> Fixes: 7ae14cf581f2 ("phy: ti: j721e-wiz: Implement DisplayPort mode to the wiz driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Roger Quadros <rogerq@kernel.org>

> ---
>  drivers/phy/ti/phy-j721e-wiz.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
> index 20af142580ad..438ccce3d1bf 100644
> --- a/drivers/phy/ti/phy-j721e-wiz.c
> +++ b/drivers/phy/ti/phy-j721e-wiz.c
> @@ -1400,7 +1400,8 @@ static int wiz_probe(struct platform_device *pdev)
>  	if (IS_ERR(wiz->scm_regmap)) {
>  		if (wiz->type == J7200_WIZ_10G) {
>  			dev_err(dev, "Couldn't get ti,scm regmap\n");
> -			return -ENODEV;
> +			ret = -ENODEV;
> +			goto err_addr_to_resource;
>  		}
>  
>  		wiz->scm_regmap = NULL;
> @@ -1450,7 +1451,7 @@ static int wiz_probe(struct platform_device *pdev)
>  
>  	ret = wiz_get_lane_phy_types(dev, wiz);
>  	if (ret)
> -		return ret;
> +		goto err_addr_to_resource;
>  
>  	wiz->dev = dev;
>  	wiz->regmap = regmap;

cheers,
-roger

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2022-09-23  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 11:21 [PATCH] phy: ti: phy-j721e-wiz: fix reference leaks in wiz_probe() Dan Carpenter
2022-09-23  8:58 ` Roger Quadros [this message]
2022-09-24  6:29 ` Vinod Koul

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=d3b8754e-f888-5bef-c6c3-16c42c598421@kernel.org \
    --to=rogerq@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=jsarha@ti.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-phy@lists.infradead.org \
    --cc=s-vadapalli@ti.com \
    --cc=t-patil@ti.com \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    /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