Skip to content

Commit

Permalink
V4L/DVB (4847): Drivers/media/dvb/frontends: kfree() cleanups
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Dec 10, 2006
1 parent 76db93d commit 2213918
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions drivers/media/dvb/frontends/dvb-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/media/dvb/frontends/tda826x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/media/dvb/frontends/tua6100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2213918

Please sign in to comment.