Skip to contentSkip to conversation

media: usb: go7007: s2250-board: add missed i2c_unregister_device

PATCH New Chuhong Yuan 1 participant 1 message Nov 18, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: usb: go7007: s2250-board: add missed i2c_unregister_device

The driver forgets to call i2c_unregister_device in remove like what is done in probe failure.
Add the missed call to fix it.

---
 drivers/media/usb/go7007/s2250-board.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/usb/go7007/s2250-board.c +1 -0
index 49e75a1a1f3f..b9e45124673b 100644
@@ -607,6 +607,7 @@ static int s2250_remove(struct i2c_client *client)
 {
 	struct s2250 *state = to_state(i2c_get_clientdata(client));
 
+	i2c_unregister_device(state->audio);
 	v4l2_device_unregister_subdev(&state->sd);
 	v4l2_ctrl_handler_free(&state->hdl);
 	kfree(state);
Signature · 1 line
2.24.0