Skip to content

Commit

Permalink
[media] media: tuners: Remove redundant NULL check before kfree
Browse files Browse the repository at this point in the history
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Syam Sidhardhan authored and Mauro Carvalho Chehab committed Mar 18, 2013
1 parent 18552ea commit f1065c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/tuners/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,8 +1378,7 @@ static int xc2028_set_config(struct dvb_frontend *fe, void *priv_cfg)
* For the firmware name, keep a local copy of the string,
* in order to avoid troubles during device release.
*/
if (priv->ctrl.fname)
kfree(priv->ctrl.fname);
kfree(priv->ctrl.fname);
memcpy(&priv->ctrl, p, sizeof(priv->ctrl));
if (p->fname) {
priv->ctrl.fname = kstrdup(p->fname, GFP_KERNEL);
Expand Down

0 comments on commit f1065c9

Please sign in to comment.