Re: (subset) [PATCH] leds: pca9532: Fix phantom device registration on missing hardware

Lee Jones <[email protected]> Thu, 23 Jul 2026 14:51:17 +0100
Newsgroups org.kernel.vger.linux-leds,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Message-ID <178481467735.3460330.9170439328076726240.b4-ty@b4>
On Wed, 15 Jul 2026 16:07:47 +0800, Cosmo Chou wrote:
> The initial PWM and PSC register writes in pca9532_configure() do not
> check the return values of i2c_smbus_write_byte_data(). If the I2C
> device is physically absent from the bus, the write fails with -ENXIO.
> However, the driver ignores this error and allows probe() to complete
> successfully.
> 
> This results in the registration of phantom LED class devices and
> gpiochips backed by non-existent hardware. Subsequent GPIO reads from
> these phantom chips return bogus values (due to -ENXIO being truncated
> to an unsigned char in pca9532_gpio_get_value()), silently corrupting
> hardware state tracking in userspace.
> 
> [...]

Applied, thanks!

[1/1] leds: pca9532: Fix phantom device registration on missing hardware
      commit: 8d6b6c05b8e33d11e3fb3203309385e1a9cceecd

--
Lee Jones [李琼斯]