kernel_samsung_a53x/drivers/i2c/muxes
Herve Codina 8e2e434a9d i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
commit 3171d37b58a76e1febbf3f4af2d06234a98cf88b upstream.

i2c-mux-pinctrl uses the pair of_find_i2c_adapter_by_node() /
i2c_put_adapter(). These pair alone is not correct to properly lock the
I2C parent adapter.

Indeed, i2c_put_adapter() decrements the module refcount while
of_find_i2c_adapter_by_node() does not increment it. This leads to an
underflow of the parent module refcount.

Use the dedicated function, of_get_i2c_adapter_by_node(), to handle
correctly the module refcount.

Fixes: c4aee3e1b0de ("i2c: mux: pinctrl: remove platform_data")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Cc: stable@vger.kernel.org
Acked-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 10:58:30 +01:00
..
i2c-arb-gpio-challenge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-demux-pinctrl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mux-gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mux-gpmux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mux-ltc4306.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mux-mlxcpld.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mux-pca954x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mux-pca9541.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c-mux-pinctrl.c i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node() 2024-11-18 10:58:30 +01:00
i2c-mux-reg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00