V4L/DVB (4847): Drivers/media/dvb/frontends: kfree() cleanups
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 19 Nov 2006 22:49:11 +0000 (19:49 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 10 Dec 2006 10:51:33 +0000 (08:51 -0200)
We don't have to check for NULL before kfree()
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/frontends/dvb-pll.c
drivers/media/dvb/frontends/tda826x.c
drivers/media/dvb/frontends/tua6100.c

index b7e7108ee5b3cadd0e82c562a1264575a9e9a093..78114fc26724bd5276a6a1963c28fac6bc3dd307 100644 (file)
@@ -478,8 +478,7 @@ EXPORT_SYMBOL(dvb_pll_configure);
 
 static int dvb_pll_release(struct dvb_frontend *fe)
 {
-       if (fe->tuner_priv)
-               kfree(fe->tuner_priv);
+       kfree(fe->tuner_priv);
        fe->tuner_priv = NULL;
        return 0;
 }
index 34815b0b97e486964641d0337567bda932d691b8..4f01d7b47cd5ead2c47b44140843ed7997b5e76e 100644 (file)
@@ -42,8 +42,7 @@ struct tda826x_priv {
 
 static int tda826x_release(struct dvb_frontend *fe)
 {
-       if (fe->tuner_priv)
-               kfree(fe->tuner_priv);
+       kfree(fe->tuner_priv);
        fe->tuner_priv = NULL;
        return 0;
 }
index 88554393a9bf19627c427c159ed153ef30a4276e..6ba0029dcf2eee56e93315d10f089a47772f5a3d 100644 (file)
@@ -43,8 +43,7 @@ struct tua6100_priv {
 
 static int tua6100_release(struct dvb_frontend *fe)
 {
-       if (fe->tuner_priv)
-               kfree(fe->tuner_priv);
+       kfree(fe->tuner_priv);
        fe->tuner_priv = NULL;
        return 0;
 }