]> Pileus Git - ~andy/linux/commitdiff
[media] tvp514x: Fix double free
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 2 May 2013 13:09:07 +0000 (10:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 21 May 2013 10:50:13 +0000 (07:50 -0300)
The tvp514x data structure is allocated using devm_kzalloc(). Freeing it
explictly would result in a double free. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/i2c/tvp514x.c

index ab8f3fee7e94463147dff499ad95b39a204e4dbc..7438e015d879995d792bb36322412ad963e89a5a 100644 (file)
@@ -1120,7 +1120,6 @@ tvp514x_probe(struct i2c_client *client, const struct i2c_device_id *id)
        if (ret < 0) {
                v4l2_err(sd, "%s decoder driver failed to register !!\n",
                         sd->name);
-               kfree(decoder);
                return ret;
        }
 #endif