]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[media] media: tuners: Remove redundant NULL check before kfree
authorSyam Sidhardhan <syamsidhardh@gmail.com>
Tue, 26 Feb 2013 18:30:45 +0000 (15:30 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 18 Mar 2013 20:04:55 +0000 (17:04 -0300)
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>
drivers/media/tuners/tuner-xc2028.c

index 09451737c77e8244339940cca83fcd0a9bbf67f1..878d2c4d9e8ef545d7f76bbda04f5d96ecf7fdbd 100644 (file)
@@ -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);