aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/dib3000mc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/dib3000mc.c')
-rw-r--r--drivers/media/dvb/frontends/dib3000mc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c
index cc41c6bcdaf..04ce6276f87 100644
--- a/drivers/media/dvb/frontends/dib3000mc.c
+++ b/drivers/media/dvb/frontends/dib3000mc.c
@@ -899,9 +899,10 @@ int dib3000mc_attach(struct i2c_adapter *i2c_adap, int no_of_demods, u8 default_
return 0;
error:
- for (k = 0; k < num; k++)
+ for (k = 0; k < num; k++) {
kfree(demod[k]->demodulator_priv);
-
+ demod[k] = NULL;
+ }
return -EINVAL;
}