media: usb: go7007: s2250-board: add missed i2c_unregister_device
authorChuhong Yuan <hslester96@gmail.com>
Mon, 18 Nov 2019 11:40:41 +0000 (12:40 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 13 Dec 2019 08:19:29 +0000 (09:19 +0100)
The driver forgets to call i2c_unregister_device in remove like what is
done in probe failure.
Add the missed call to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/go7007/s2250-board.c

index 49e75a1..b9e4512 100644 (file)
@@ -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);