From: Michal Kubiak <michal.kubiak@intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Vinod Koul <vkoul@kernel.org>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Bhupesh Sharma <bhupesh.sharma@linaro.org>,
<netdev@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>, <kernel@pengutronix.de>,
Simon Horman <simon.horman@corigine.com>
Subject: Re: [PATCH net-next v2 03/11] net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition
Date: Mon, 8 May 2023 22:26:46 +0200 [thread overview]
Message-ID: <ZFlbBsKLGjFPEtFp@localhost.localdomain> (raw)
In-Reply-To: <20230508142637.1449363-4-u.kleine-koenig@pengutronix.de>
On Mon, May 08, 2023 at 04:26:29PM +0200, Uwe Kleine-König wrote:
> The remove callback is only ever called after .probe() returned
> successfully. After that get_stmmac_bsp_priv() always return non-NULL.
Nitpick: "always returns" or "will always return".
>
> Side note: The early exit would also be a bug because the return value
> of qcom_ethqos_remove() is ignored by the device core and the device is
> unbound unconditionally. So exiting early resulted in a dangerous
> resource leak as all devm allocated resources (some memory and the
> register mappings) are freed but the network device stays around. Using
> the network device afterwards probably oopses.
>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
Thanks,
Michal
next prev parent reply other threads:[~2023-05-08 20:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void Uwe Kleine-König
2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 14:47 ` Peppe CAVALLARO
2023-05-08 14:47 ` Peppe CAVALLARO
2023-05-08 14:47 ` Peppe CAVALLARO
2023-05-08 17:19 ` Uwe Kleine-König
2023-05-08 17:19 ` Uwe Kleine-König
2023-05-08 19:38 ` Martin Blumenstingl
2023-05-08 19:38 ` Martin Blumenstingl
2023-05-08 14:26 ` [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() " Uwe Kleine-König
2023-05-08 19:33 ` Simon Horman
2023-05-09 1:33 ` nobuhiro1.iwamatsu
2023-05-08 14:26 ` [PATCH net-next v2 03/11] net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition Uwe Kleine-König
2023-05-08 20:26 ` Michal Kubiak [this message]
2023-05-08 14:26 ` [PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to platform remove callback returning void Uwe Kleine-König
2023-05-09 2:28 ` nobuhiro1.iwamatsu
2023-05-08 14:26 ` [PATCH net-next v2 05/11] net: stmmac: dwmac-dwc-qos-eth: " Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos: " Uwe Kleine-König
2023-05-09 7:51 ` Bhupesh Sharma
2023-05-10 6:29 ` Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 07/11] net: stmmac: dwmac-rk: " Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 08/11] net: stmmac: dwmac-sti: " Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 09/11] net: stmmac: dwmac-stm32: " Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 10/11] net: stmmac: dwmac-sun8i: " Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 11/11] net: stmmac: dwmac-tegra: " Uwe Kleine-König
2023-05-08 20:30 ` [PATCH net-next v2 00/11] net: stmmac: " Michal Kubiak
2023-05-08 20:30 ` Michal Kubiak
2023-05-08 20:30 ` Michal Kubiak
2023-05-10 3:00 ` patchwork-bot+netdevbpf
2023-05-10 3: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=ZFlbBsKLGjFPEtFp@localhost.localdomain \
--to=michal.kubiak@intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=bhupesh.sharma@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=simon.horman@corigine.com \
--cc=u.kleine-koenig@pengutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.