linux-stable/drivers/i2c
Wolfram Sang 4e75e222d3 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:29:32 +02:00
..
algos
busses i2c: i801: Avoid potential double call to gpiod_remove_lookup_table 2024-04-03 15:19:43 +02:00
muxes i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node() 2023-11-02 09:35:30 +01:00
Kconfig
Makefile
i2c-boardinfo.c
i2c-core-acpi.c More ACPI updates for 6.1-rc1 2022-10-10 13:28:06 -07:00
i2c-core-base.c i2c: smbus: fix NULL function pointer dereference 2024-05-02 16:29:32 +02:00
i2c-core-of.c treewide: Fix probing of devices in DT overlays 2023-09-13 09:43:05 +02:00
i2c-core-slave.c
i2c-core-smbus.c
i2c-core.h i2c: core: Fix atomic xfer check for non-preempt config 2024-01-10 17:10:35 +01:00
i2c-dev.c i2c: dev: copy userspace array safely 2023-11-28 17:07:02 +00:00
i2c-mux.c i2c: mux: Avoid potential false error message in i2c_mux_add_adapter 2023-10-25 12:03:09 +02:00
i2c-slave-eeprom.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
i2c-slave-testunit.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
i2c-smbus.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
i2c-stub.c