[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 28 Jul 2023 16:26:39 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Yuanjun Gong <ruc_gongyuanjun@....com>
Cc: "David S . Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH 1/1] net: korina: fix value check in korina_probe()
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
Powered by blists - more mailing lists