media: lgdt3306a: Fix a double kfree on i2c device remove
authorBrad Love <brad@nextdimension.cc>
Fri, 5 Jan 2018 14:57:13 +0000 (09:57 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Mar 2018 09:40:02 +0000 (04:40 -0500)
commit94448e21cf08b10f7dc7acdaca387594370396b0
tree5d7f00c5646aa7e7429513d6c34a34e17875d1b1
parent835d66173a38538c072a7c393d02360dcfac8582
media: lgdt3306a: Fix a double kfree on i2c device remove

Both lgdt33606a_release and lgdt3306a_remove kfree state, but _release is
called first, then _remove operates on states members before kfree'ing it.
This can lead to random oops/GPF/etc on USB disconnect.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/lgdt3306a.c