Message ID | 079a2ff6ea88b8918b6144c8c054c6d4bb044347.1405179280.git.shuah.kh@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c index 9482954..54855a9 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);
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> --- drivers/media/dvb-frontends/drx39xyj/drxj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)