Re: [PATCH] gpio: mvebu: use devm_clk_get_optional_enabled()

From: Andrew Lunn

Date: Wed Jul 08 2026 - 10:40:44 EST


On Tue, Jul 07, 2026 at 04:06:51PM -0700, Rosen Penev wrote:
> The clock is obtained without doing any sort of cleanup on remove or
> anywhere else.

Given this is a SoC gpio controller, it is very unlikely it every gets
unloaded. There is no remove method, so is it even possible to remove
it?

How did you test this?

> - if (IS_ERR(mvchip->clk))
> - return PTR_ERR(mvchip->clk);
> + if (!mvchip->clk)
> + return -ENODEV;

You should not replace one error code with another.

This driver has been in use for over 14 years, without anybody having
problems with it. The SoCs themselves are EOL. They were used in NAS
boxes, which do tend to have a long life, but i doubt there are many
left still running a modern kernel.

Changes like this seems pointless, and just waste everybody's time.

Andrew