Re: [PATCH 5.10,5.15,6.1,6.6 RESEND] leds: spi-byte: Initialize device node before access
From: Andy Shevchenko
Date: Fri Jan 02 2026 - 07:37:41 EST
On Tue, Dec 30, 2025 at 04:45:11PM -0800, Tiffany Yang wrote:
> Commit 7f9ab862e05c ("leds: spi-byte: Call of_node_put() on error path")
> was merged in 6.11 and then backported to stable trees through 5.10. It
> relocates the line that initializes the variable 'child' to a later
> point in spi_byte_probe().
>
> Versions < 6.9 do not have commit ccc35ff2fd29 ("leds: spi-byte: Use
> devm_led_classdev_register_ext()"), which removes a line that reads a
> property from 'child' before its new initialization point. Consequently,
> spi_byte_probe() reads from an uninitialized device node in stable
> kernels 6.6-5.10.
I'm wondering if in long term the easier maintenance will be with that patch
also being backported rather than this being applied.
> Initialize 'child' before it is first accessed.
--
With Best Regards,
Andy Shevchenko