linux-stable/drivers/i2c
Wolfram Sang 5a09eae9a7 i2c: smbus: fix NULL function pointer dereference
[ Upstream commit 91811a31b6 ]

Baruch reported an OOPS when using the designware controller as target
only. Target-only modes break the assumption of one transfer function
always being available. Fix this by always checking the pointer in
__i2c_transfer.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Closes: https://lore.kernel.org/r/4269631780e5ba789cf1ae391eec1b959def7d99.1712761976.git.baruch@tkos.co.il
Fixes: 4b1acc4333 ("i2c: core changes for slave support")
[wsa: dropped the simplification in core-smbus to avoid theoretical regressions]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-02 16:24:50 +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: acpi: fix resource leak in reconfiguration device addition 2021-10-02 08:38:43 +02:00
i2c-core-base.c i2c: smbus: fix NULL function pointer dereference 2024-05-02 16:24:50 +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