netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: Roger Quadros <rogerq@kernel.org>
Cc: davem@davemloft.net, maciej.fijalkowski@intel.com,
	kuba@kernel.org, andrew@lunn.ch, edumazet@google.com,
	pabeni@redhat.com, vigneshr@ti.com, s-vadapalli@ti.com,
	linux-omap@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix PM runtime leakage in am65_cpsw_nuss_ndo_slave_open()
Date: Fri, 9 Dec 2022 16:54:44 -0800	[thread overview]
Message-ID: <Y5PY1Cdp3px3vRqE@x130> (raw)
In-Reply-To: <20221208105534.63709-1-rogerq@kernel.org>

On 08 Dec 12:55, Roger Quadros wrote:
>Ensure pm_runtime_put() is issued in error path.
>
>Reported-by: Jakub Kicinski <kuba@kernel.org>
>Signed-off-by: Roger Quadros <rogerq@kernel.org>


Reviewed-by: Saeed Mahameed <saeed@kernel.org>


[...]

>@@ -622,6 +623,10 @@ static int am65_cpsw_nuss_ndo_slave_open(struct net_device *ndev)
> error_cleanup:
> 	am65_cpsw_nuss_ndo_slave_stop(ndev);

BTW, while looking at the ndo_slave_stop() call, it seems to abort if 
am65_cpsw_nuss_common_stop() fails, but looking deeper at that and it seems 
am65_cpsw_nuss_common_stop() can never fail, so you might want to fix that.

> 	return ret;
>+
>+runtime_put:
>+	pm_runtime_put(common->dev);
>+	return ret;
> }
>
> static void am65_cpsw_nuss_rx_cleanup(void *data, dma_addr_t desc_dma)
>-- 
>2.34.1
>

  reply	other threads:[~2022-12-10  0:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 10:55 [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix PM runtime leakage in am65_cpsw_nuss_ndo_slave_open() Roger Quadros
2022-12-10  0:54 ` Saeed Mahameed [this message]
2022-12-12  9:20   ` Roger Quadros
2022-12-12 21:00 ` patchwork-bot+netdevbpf

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=Y5PY1Cdp3px3vRqE@x130 \
    --to=saeed@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).