From: Jakub Kicinski <kuba@kernel.org>
To: Vitaliy Sochnev <sochnev.v.74@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: air_en8811h: simplify en8811h_probe() trailing return
Date: Wed, 9 Sep 2026 17:48:15 -0700 [thread overview]
Message-ID: <20260909174815.7c857995@kernel.org> (raw)
In-Reply-To: <20260906193557.35115-1-sochnev.v.74@gmail.com>
On Sun, 6 Sep 2026 20:35:57 +0100 Vitaliy Sochnev wrote:
> en8811h_clk_provider_setup() is now the last statement in the
> function, so the intermediate "if (ret) return ret; return 0;" is
> redundant.
>
> Signed-off-by: Vitaliy Sochnev <sochnev.v.74@gmail.com>
> ---
> drivers/net/phy/air_en8811h.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/net/phy/air_en8811h.c b/drivers/net/phy/air_en8811h.c
> index ec7c44ca68e7..99221ee87977 100644
> --- a/drivers/net/phy/air_en8811h.c
> +++ b/drivers/net/phy/air_en8811h.c
> @@ -1168,11 +1168,7 @@ static int en8811h_probe(struct phy_device *phydev)
>
> priv->phydev = phydev;
> /* Co-Clock Output */
> - ret = en8811h_clk_provider_setup(&phydev->mdio.dev, &priv->hw);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return en8811h_clk_provider_setup(&phydev->mdio.dev, &priv->hw);
> }
>
> static int an8811hb_config_serdes_polarity(struct phy_device *phydev)
It's a personal preference, someone may think it's better to keep the
ret handling separate to avoid changing git blame when more code is
added. The shorter version is probably slightly better but not enough
to justify a cleanup of this sort IMO, sorry.
prev parent reply other threads:[~2026-09-10 0:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 19:35 Vitaliy Sochnev
2026-09-10 0:48 ` Jakub Kicinski [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=20260909174815.7c857995@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sochnev.v.74@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®