Subject: Re: [PATCH 1/1] net: korina: fix value check in korina_probe()

From: Jakub Kicinski <[email-masked]>
Date: Fri, 28 Jul 2023 16:26:39 -0700

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