From b5d24e3fdbcb2224e74af148395d4cca2b094384 Mon Sep 17 00:00:00 2001 From: Patrick Boettcher Date: Wed, 2 Aug 2006 14:26:27 +0200 Subject: DiB3000MC: set FE to NULL after being freed From: Patrick Boettcher DiB3000MC: set FE to NULL after being freed Signed-off-by: Patrick Boettcher --- linux/drivers/media/dvb/frontends/dib3000mc.c | 5 +++-- linux/drivers/media/dvb/frontends/dibx000_common.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media/dvb/frontends') diff --git a/linux/drivers/media/dvb/frontends/dib3000mc.c b/linux/drivers/media/dvb/frontends/dib3000mc.c index 3e68fd8e3..0a1369cc9 100644 --- a/linux/drivers/media/dvb/frontends/dib3000mc.c +++ b/linux/drivers/media/dvb/frontends/dib3000mc.c @@ -908,9 +908,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; } diff --git a/linux/drivers/media/dvb/frontends/dibx000_common.h b/linux/drivers/media/dvb/frontends/dibx000_common.h index 428999f0a..bb0c65f8a 100644 --- a/linux/drivers/media/dvb/frontends/dibx000_common.h +++ b/linux/drivers/media/dvb/frontends/dibx000_common.h @@ -117,7 +117,7 @@ enum dibx000_adc_states { #define BW_INDEX_TO_KHZ(v) ( (v) == BANDWIDTH_8_MHZ ? 8000 : \ (v) == BANDWIDTH_7_MHZ ? 7000 : \ - (v) == BANDWIDTH_6_MHZ ? 6000 : 8000 ) + (v) == BANDWIDTH_6_MHZ ? 6000 : 8000 ) /* Chip output mode. */ #define OUTMODE_HIGH_Z 0 -- cgit v1.2.3