Subject: Re: [PATCH V3] net: mv643xx_eth: use platform_get_irq() instead of platform_get_resource()

From: Andrew Lunn <[email-masked]>
Date: Mon, 14 Mar 2022 14:04:13 +0100

> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	BUG_ON(!res);
> -	dev->irq = res->start;
> +	irq = platform_get_irq(pdev, 0);
> +	if (WARN_ON(irq < 0)) {
> +		if (!IS_ERR(mp->clk))
> +			clk_disable_unprepare(mp->clk);
> +		free_netdev(dev);
> +		return irq;
> +	}

Why not
		goto out;

?

And FYI: You can pass an error code to clk_disable_unprepare() and it
will not care and do the right thing. So if you were to keep this
code, which you should not, you don't need the if !IS_ERR(mp->clk))

      Andrew