diff options
| author | Myeonghun Pak <mhun512@gmail.com> | 2026-07-21 23:41:47 +0900 |
|---|---|---|
| committer | Andi Shyti <andi.shyti@kernel.org> | 2026-07-25 01:01:06 +0200 |
| commit | 877ed2eb9c14e07e19041e88470f98df684537ea (patch) | |
| tree | a85246287f0f6171beff7068eaef68580886ac07 /scripts | |
| parent | e26e82b04ffdd60d44f2e64db1495855b78e3083 (diff) | |
| download | linux-next-877ed2eb9c14e07e19041e88470f98df684537ea.tar.gz linux-next-877ed2eb9c14e07e19041e88470f98df684537ea.zip | |
i2c: amd-mp2: Unregister callback on adapter add failure
amd_mp2_register_cb() stores the platform I2C context in the MP2 PCI
driver's callback table before the adapter is registered. If
i2c_add_adapter() fails, probe returns and devres frees the context,
but the PCI driver can still dereference the stale pointer from its IRQ
and system-sleep callbacks.
Unregister the callback before returning the adapter registration error.
Fixes: 529766e0a011 ("i2c: Add drivers for the AMD PCIe MP2 I2C controller")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Cc: <stable@vger.kernel.org> # v5.2+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260721144147.31150-1-mhun512@gmail.com
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
