OSDN Git Service

media: TDA1997x: fix tda1997x_remove()
authorKrzysztof Hałasa <khalasa@piap.pl>
Fri, 30 Jul 2021 06:59:19 +0000 (08:59 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:07:39 +0000 (10:07 +0200)
commit8d246e293228881b557798416cb064d644cdb10e
treec337a496f1edb4282bba4db83ca953bda7cad76b
parent2c98b8a3458df03abdc6945bbef67ef91d181938
media: TDA1997x: fix tda1997x_remove()

TDA1997x driver tried to hold two values in a single variable:
device's "client data" pointer was first set to "sd" in
v4l2_i2c_subdev_init(), then it was overwritten explicitly
using dev_set_drvdata() with "state". This caused
tda1997x_remove() to fail badly.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/tda1997x.c