netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Yuanjun Gong <ruc_gongyuanjun@163.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] net: korina: fix value check in korina_probe()
Date: Fri, 28 Jul 2023 16:26:39 -0700	[thread overview]
Message-ID: <20230728162639.1c08f645@kernel.org> (raw)
In-Reply-To: <20230726132943.20318-1-ruc_gongyuanjun@163.com>

On Wed, 26 Jul 2023 21:29:43 +0800 Yuanjun Gong wrote:
>	clk = devm_clk_get_optional(&pdev->dev, "mdioclk");

Why not switch this to devm_clk_get_optional_enabled() instead?
Error already handled, makes the code shorter..

>  	if (IS_ERR(clk))
>  		return PTR_ERR(clk);
>  	if (clk) {
> -		clk_prepare_enable(clk);
> +		rc = clk_prepare_enable(clk);
> +		if (rc)
> +			return rc;
-- 
pw-bot: cr

  reply	other threads:[~2023-07-28 23:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 13:29 [PATCH 1/1] net: korina: fix value check in korina_probe() Yuanjun Gong
2023-07-28 23:26 ` Jakub Kicinski [this message]
2023-07-31  9:05   ` [PATCH v2 1/1] net: korina: handle clk prepare error " Yuanjun Gong
2023-08-01 22: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=20230728162639.1c08f645@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ruc_gongyuanjun@163.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).