summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorKenneth Aafloy <devnull@localhost>2005-03-09 15:52:00 +0000
committerKenneth Aafloy <devnull@localhost>2005-03-09 15:52:00 +0000
commitc47b4ac059887d222399286eb2e4dea319726adb (patch)
tree9ccaf39ebb357c5038ff25e848798c0b33e67f90 /linux/drivers
parent493f26ca4fb6e69acc47779bb04d0901b1018290 (diff)
downloadmediapointer-dvb-s2-c47b4ac059887d222399286eb2e4dea319726adb.tar.gz
mediapointer-dvb-s2-c47b4ac059887d222399286eb2e4dea319726adb.tar.bz2
- kfree(NULL) is safe
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop.c3
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst.c2
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c3
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c3
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.c4
-rw-r--r--linux/drivers/media/dvb/frontends/at76c651.c2
-rw-r--r--linux/drivers/media/dvb/frontends/cx22700.c2
-rw-r--r--linux/drivers/media/dvb/frontends/cx22702.c2
-rw-r--r--linux/drivers/media/dvb/frontends/cx24110.c2
-rw-r--r--linux/drivers/media/dvb/frontends/dib3000mb.c3
-rw-r--r--linux/drivers/media/dvb/frontends/dib3000mc.c3
-rw-r--r--linux/drivers/media/dvb/frontends/dvb_dummy_fe.c2
-rw-r--r--linux/drivers/media/dvb/frontends/l64781.c2
-rw-r--r--linux/drivers/media/dvb/frontends/mt312.c3
-rw-r--r--linux/drivers/media/dvb/frontends/mt352.c2
-rw-r--r--linux/drivers/media/dvb/frontends/nxt2002.c2
-rw-r--r--linux/drivers/media/dvb/frontends/nxt6000.c2
-rw-r--r--linux/drivers/media/dvb/frontends/or51211.c2
-rw-r--r--linux/drivers/media/dvb/frontends/sp8870.c2
-rw-r--r--linux/drivers/media/dvb/frontends/sp887x.c2
-rw-r--r--linux/drivers/media/dvb/frontends/stv0297.c3
-rw-r--r--linux/drivers/media/dvb/frontends/stv0299.c2
-rw-r--r--linux/drivers/media/dvb/frontends/tda10021.c2
-rw-r--r--linux/drivers/media/dvb/frontends/tda1004x.c2
-rw-r--r--linux/drivers/media/dvb/frontends/tda8083.c2
-rw-r--r--linux/drivers/media/dvb/frontends/tda80xx.c2
-rw-r--r--linux/drivers/media/dvb/frontends/ves1820.c2
-rw-r--r--linux/drivers/media/dvb/frontends/ves1x93.c2
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c4
29 files changed, 30 insertions, 39 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop.c b/linux/drivers/media/dvb/b2c2/flexcop.c
index 0e3501123..ddc057a24 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop.c
@@ -218,8 +218,7 @@ EXPORT_SYMBOL(flexcop_device_kmalloc);
void flexcop_device_kfree(struct flexcop_device *fc)
{
- if (fc != NULL)
- kfree(fc->bus_specific);
+ kfree(fc->bus_specific);
kfree(fc);
}
EXPORT_SYMBOL(flexcop_device_kfree);
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c
index 859946703..eac83768d 100644
--- a/linux/drivers/media/dvb/bt8xx/dst.c
+++ b/linux/drivers/media/dvb/bt8xx/dst.c
@@ -998,7 +998,7 @@ struct dvb_frontend* dst_attach(const struct dst_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
index fdc949ff1..8af9f3050 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
@@ -1733,8 +1733,7 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
if (ca != NULL) {
if (ca->dvbdev != NULL)
dvb_unregister_device(ca->dvbdev);
- if (ca->slot_info != NULL)
- kfree(ca->slot_info);
+ kfree(ca->slot_info);
kfree(ca);
}
pubca->private = NULL;
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 60c888eb2..59a9adfae 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -908,8 +908,7 @@ int dvb_unregister_frontend(struct dvb_frontend* fe)
else
printk("dvb_frontend: Demodulator (%s) does not have a release callback!\n", fe->ops->info.name);
/* fe is invalid now */
- if (fepriv)
- kfree(fepriv);
+ kfree(fepriv);
up (&frontend_mutex);
return 0;
}
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c
index fa857dd48..73fd74fcf 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -395,9 +395,7 @@ int dvb_usercopy(struct inode *inode, struct file *file,
}
out:
- if (mbuf)
- kfree(mbuf);
-
+ kfree(mbuf);
return err;
}
diff --git a/linux/drivers/media/dvb/frontends/at76c651.c b/linux/drivers/media/dvb/frontends/at76c651.c
index 861876791..ce2eaa164 100644
--- a/linux/drivers/media/dvb/frontends/at76c651.c
+++ b/linux/drivers/media/dvb/frontends/at76c651.c
@@ -402,7 +402,7 @@ struct dvb_frontend* at76c651_attach(const struct at76c651_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/cx22700.c b/linux/drivers/media/dvb/frontends/cx22700.c
index 663002da3..a21227904 100644
--- a/linux/drivers/media/dvb/frontends/cx22700.c
+++ b/linux/drivers/media/dvb/frontends/cx22700.c
@@ -392,7 +392,7 @@ struct dvb_frontend* cx22700_attach(const struct cx22700_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/cx22702.c b/linux/drivers/media/dvb/frontends/cx22702.c
index 7bcff1c62..1930b513e 100644
--- a/linux/drivers/media/dvb/frontends/cx22702.c
+++ b/linux/drivers/media/dvb/frontends/cx22702.c
@@ -476,7 +476,7 @@ struct dvb_frontend* cx22702_attach(const struct cx22702_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/cx24110.c b/linux/drivers/media/dvb/frontends/cx24110.c
index 1dec5d74f..a4a8ac6b0 100644
--- a/linux/drivers/media/dvb/frontends/cx24110.c
+++ b/linux/drivers/media/dvb/frontends/cx24110.c
@@ -607,7 +607,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/dib3000mb.c b/linux/drivers/media/dvb/frontends/dib3000mb.c
index 3beb4483a..02ee722a1 100644
--- a/linux/drivers/media/dvb/frontends/dib3000mb.c
+++ b/linux/drivers/media/dvb/frontends/dib3000mb.c
@@ -738,8 +738,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
return &state->frontend;
error:
- if (state)
- kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/dib3000mc.c b/linux/drivers/media/dvb/frontends/dib3000mc.c
index 76707bfca..08d2e8488 100644
--- a/linux/drivers/media/dvb/frontends/dib3000mc.c
+++ b/linux/drivers/media/dvb/frontends/dib3000mc.c
@@ -881,8 +881,7 @@ struct dvb_frontend* dib3000mc_attach(const struct dib3000_config* config,
return &state->frontend;
error:
- if (state)
- kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/dvb_dummy_fe.c b/linux/drivers/media/dvb/frontends/dvb_dummy_fe.c
index 375d6f3b4..c05a9b056 100644
--- a/linux/drivers/media/dvb/frontends/dvb_dummy_fe.c
+++ b/linux/drivers/media/dvb/frontends/dvb_dummy_fe.c
@@ -123,7 +123,7 @@ struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void)
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/l64781.c b/linux/drivers/media/dvb/frontends/l64781.c
index 66e7426d0..9ac95de98 100644
--- a/linux/drivers/media/dvb/frontends/l64781.c
+++ b/linux/drivers/media/dvb/frontends/l64781.c
@@ -559,7 +559,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
error:
if (reg0x3e >= 0) l64781_writereg (state, 0x3e, reg0x3e); /* restore reg 0x3e */
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/mt312.c b/linux/drivers/media/dvb/frontends/mt312.c
index 9880b3742..176a22e34 100644
--- a/linux/drivers/media/dvb/frontends/mt312.c
+++ b/linux/drivers/media/dvb/frontends/mt312.c
@@ -641,8 +641,7 @@ struct dvb_frontend* vp310_attach(const struct mt312_config* config,
return &state->frontend;
error:
- if (state)
- kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/mt352.c b/linux/drivers/media/dvb/frontends/mt352.c
index 7e29a25c1..90e2fb2a0 100644
--- a/linux/drivers/media/dvb/frontends/mt352.c
+++ b/linux/drivers/media/dvb/frontends/mt352.c
@@ -581,7 +581,7 @@ struct dvb_frontend* mt352_attach(const struct mt352_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/nxt2002.c b/linux/drivers/media/dvb/frontends/nxt2002.c
index ff3b261fd..1c56e4dd0 100644
--- a/linux/drivers/media/dvb/frontends/nxt2002.c
+++ b/linux/drivers/media/dvb/frontends/nxt2002.c
@@ -659,7 +659,7 @@ struct dvb_frontend* nxt2002_attach(const struct nxt2002_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/nxt6000.c b/linux/drivers/media/dvb/frontends/nxt6000.c
index 9708d4732..a41f7da8b 100644
--- a/linux/drivers/media/dvb/frontends/nxt6000.c
+++ b/linux/drivers/media/dvb/frontends/nxt6000.c
@@ -511,7 +511,7 @@ struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/or51211.c b/linux/drivers/media/dvb/frontends/or51211.c
index b9153c7a6..1e8b1ea45 100644
--- a/linux/drivers/media/dvb/frontends/or51211.c
+++ b/linux/drivers/media/dvb/frontends/or51211.c
@@ -613,7 +613,7 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/sp8870.c b/linux/drivers/media/dvb/frontends/sp8870.c
index 538cb03ee..58ad34ef0 100644
--- a/linux/drivers/media/dvb/frontends/sp8870.c
+++ b/linux/drivers/media/dvb/frontends/sp8870.c
@@ -570,7 +570,7 @@ struct dvb_frontend* sp8870_attach(const struct sp8870_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/sp887x.c b/linux/drivers/media/dvb/frontends/sp887x.c
index f34c010d0..7eae833ec 100644
--- a/linux/drivers/media/dvb/frontends/sp887x.c
+++ b/linux/drivers/media/dvb/frontends/sp887x.c
@@ -564,7 +564,7 @@ struct dvb_frontend* sp887x_attach(const struct sp887x_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/stv0297.c b/linux/drivers/media/dvb/frontends/stv0297.c
index 65255113f..502c6403d 100644
--- a/linux/drivers/media/dvb/frontends/stv0297.c
+++ b/linux/drivers/media/dvb/frontends/stv0297.c
@@ -758,8 +758,7 @@ struct dvb_frontend *stv0297_attach(const struct stv0297_config *config,
return &state->frontend;
error:
- if (state)
- kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c
index a468f8804..15b40541b 100644
--- a/linux/drivers/media/dvb/frontends/stv0299.c
+++ b/linux/drivers/media/dvb/frontends/stv0299.c
@@ -675,7 +675,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/tda10021.c b/linux/drivers/media/dvb/frontends/tda10021.c
index 27e3faa2b..4e40d95ee 100644
--- a/linux/drivers/media/dvb/frontends/tda10021.c
+++ b/linux/drivers/media/dvb/frontends/tda10021.c
@@ -420,7 +420,7 @@ struct dvb_frontend* tda10021_attach(const struct tda10021_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/tda1004x.c b/linux/drivers/media/dvb/frontends/tda1004x.c
index 0860e895a..687ad9cf3 100644
--- a/linux/drivers/media/dvb/frontends/tda1004x.c
+++ b/linux/drivers/media/dvb/frontends/tda1004x.c
@@ -1097,7 +1097,7 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/tda8083.c b/linux/drivers/media/dvb/frontends/tda8083.c
index db6624b9f..da82e90d6 100644
--- a/linux/drivers/media/dvb/frontends/tda8083.c
+++ b/linux/drivers/media/dvb/frontends/tda8083.c
@@ -405,7 +405,7 @@ struct dvb_frontend* tda8083_attach(const struct tda8083_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/tda80xx.c b/linux/drivers/media/dvb/frontends/tda80xx.c
index 3d552c34f..57d2f3774 100644
--- a/linux/drivers/media/dvb/frontends/tda80xx.c
+++ b/linux/drivers/media/dvb/frontends/tda80xx.c
@@ -683,7 +683,7 @@ struct dvb_frontend* tda80xx_attach(const struct tda80xx_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c
index 62945ef1f..9c0d23e1d 100644
--- a/linux/drivers/media/dvb/frontends/ves1820.c
+++ b/linux/drivers/media/dvb/frontends/ves1820.c
@@ -404,7 +404,7 @@ struct dvb_frontend* ves1820_attach(const struct ves1820_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/frontends/ves1x93.c b/linux/drivers/media/dvb/frontends/ves1x93.c
index b97861c5a..edcad283a 100644
--- a/linux/drivers/media/dvb/frontends/ves1x93.c
+++ b/linux/drivers/media/dvb/frontends/ves1x93.c
@@ -497,7 +497,7 @@ struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config,
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
index ff0e5212a..1699cc9f6 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
@@ -169,7 +169,7 @@ struct dvb_frontend* ttusbdecfe_dvbt_attach(const struct ttusbdecfe_config* conf
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}
@@ -195,7 +195,7 @@ struct dvb_frontend* ttusbdecfe_dvbs_attach(const struct ttusbdecfe_config* conf
return &state->frontend;
error:
- if (state) kfree(state);
+ kfree(state);
return NULL;
}