Re: (subset) [PATCH] leds: pca9532: Fix phantom device registration on missing hardware
From: Lee Jones
Date: Thu Jul 23 2026 - 09:54:10 EST
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 [李琼斯]