linux-stable/drivers/i2c
Heiner Kallweit b3914fee09 i2c: i801: Avoid potential double call to gpiod_remove_lookup_table
commit ceb013b2d9 upstream.

If registering the platform device fails, the lookup table is
removed in the error path. On module removal we would try to
remove the lookup table again. Fix this by setting priv->lookup
only if registering the platform device was successful.
In addition free the memory allocated for the lookup table in
the error path.

Fixes: d308dfbf62 ("i2c: mux/i801: Switch to use descriptor passing")
Cc: stable@vger.kernel.org
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:18:46 +02:00
..
algos
busses i2c: i801: Avoid potential double call to gpiod_remove_lookup_table 2024-04-10 16:18:46 +02:00
muxes i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node() 2023-11-08 17:26:40 +01:00
Kconfig
Makefile
i2c-boardinfo.c
i2c-core-acpi.c
i2c-core-base.c i2c: Fix a potential use after free 2022-08-17 14:23:20 +02:00
i2c-core-of.c
i2c-core-slave.c
i2c-core-smbus.c
i2c-core.h i2c: core: Fix atomic xfer check for non-preempt config 2024-01-15 18:51:22 +01:00
i2c-dev.c i2c: dev: copy userspace array safely 2023-11-28 16:56:20 +00:00
i2c-mux.c i2c: mux: Avoid potential false error message in i2c_mux_add_adapter 2023-10-25 11:58:59 +02:00
i2c-slave-eeprom.c
i2c-slave-testunit.c
i2c-smbus.c
i2c-stub.c