i2c: omap: do not deselect the mux-state twice in remove()
Subsystems (4)
PATCH 1/1 i2c: omap: do not deselect the mux-state twice in remove()
omap_i2c_probe() gets the mux-state with devm_mux_state_get_optional_selected(). The helper selects the mux and deselects it again when the device is released.
omap_i2c_remove() also calls mux_state_deselect(), so the mux is deselected twice for one select. Drop the call from remove().
This issue was found by auditing the driver with an LLM coding assistant.
Fixes 43c00f2bcff7 ("i2c: omap: switch to new generic helper for getting selected mux-state")
Signed-off-by Cong Nguyen <[email protected]>
--- drivers/i2c/busses/i2c-omap.c | 3 --- 1 file changed, 3 deletions(-)
drivers/i2c/busses/i2c-omap.c +0 -3
@@ -1520,9 +1520,6 @@ static void omap_i2c_remove(struct platform_device *pdev)i2c_del_adapter (&omap->adapter); -if (omap->mux_state) -mux_state_deselect (omap->mux_state); - ret =pm_runtime_get_sync (&pdev->dev);if (ret <0 )dev_err (omap->dev,"Failed to resume hardware, skip disable\n" );
Signature · 1 line
2.25.1