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

Lee Jones <[email protected]>
Newsgroups org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel,org.kernel.vger.linux-leds
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 [李琼斯]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.