Commit 2213918a authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab

V4L/DVB (4847): Drivers/media/dvb/frontends: kfree() cleanups

We don't have to check for NULL before kfree()
Acked-by: default avatarAndrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 76db93d0
...@@ -478,8 +478,7 @@ EXPORT_SYMBOL(dvb_pll_configure); ...@@ -478,8 +478,7 @@ EXPORT_SYMBOL(dvb_pll_configure);
static int dvb_pll_release(struct dvb_frontend *fe) 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; fe->tuner_priv = NULL;
return 0; return 0;
} }
......
...@@ -42,8 +42,7 @@ struct tda826x_priv { ...@@ -42,8 +42,7 @@ struct tda826x_priv {
static int tda826x_release(struct dvb_frontend *fe) static int tda826x_release(struct dvb_frontend *fe)
{ {
if (fe->tuner_priv) kfree(fe->tuner_priv);
kfree(fe->tuner_priv);
fe->tuner_priv = NULL; fe->tuner_priv = NULL;
return 0; return 0;
} }
......
...@@ -43,8 +43,7 @@ struct tua6100_priv { ...@@ -43,8 +43,7 @@ struct tua6100_priv {
static int tua6100_release(struct dvb_frontend *fe) static int tua6100_release(struct dvb_frontend *fe)
{ {
if (fe->tuner_priv) kfree(fe->tuner_priv);
kfree(fe->tuner_priv);
fe->tuner_priv = NULL; fe->tuner_priv = NULL;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment