Re: [PATCH] iio: adc: ade9000: fix NULL pointer dereference in clkout registration

From: Andy Shevchenko

Date: Mon Aug 24 2026 - 11:22:42 EST


On Mon, Aug 24, 2026 at 08:52:10PM +0800, Linmao Li wrote:
> ade9000_setup_clkout() passes NULL as the register address when
> registering a divider clock. During clock registration, the common
> clock framework calls clk_divider_recalc_rate(), which dereferences
> the address through readl(). As a result, probing an ADE9000 configured
> as a clock provider with an external input clock crashes.
>
> CLKOUT passes CLKIN through without changing its rate. Register it as
> a 1:1 fixed-factor clock, which does not require register access.

Do you have HW to test? What will be the result for the internal clock case?

--
With Best Regards,
Andy Shevchenko