diff options
author | Shuah Khan <shuah.kh@samsung.com> | 2014-07-12 20:44:14 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-26 18:19:21 +0400 |
commit | 5b22b1a4f78d7ba29528fdc70b0c699112cff16e (patch) | |
tree | 76014cbf4a87bbccca543451e592f86fe97489be /drivers/media/dvb-frontends | |
parent | f68e35af99cfbefdd250e37d4d9ba778d67e253d (diff) | |
download | linux-5b22b1a4f78d7ba29528fdc70b0c699112cff16e.tar.xz |
[media] media: drx39xyj driver change to check fe exit flag from release
Change drx39xyj_release() to check fe exit flag to detect the
device disconnect state and avoid accessing the device after
it has been removed.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r-- | drivers/media/dvb-frontends/drx39xyj/drxj.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c index 3795f65564f8..7007e0b507c0 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.c +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c @@ -12238,7 +12238,9 @@ static void drx39xxj_release(struct dvb_frontend *fe) struct drx39xxj_state *state = fe->demodulator_priv; struct drx_demod_instance *demod = state->demod; - drxj_close(demod); + /* if device is removed don't access it */ + if (fe->exit != DVB_FE_DEVICE_REMOVED) + drxj_close(demod); kfree(demod->my_ext_attr); kfree(demod->my_common_attr); |