OSDN Git Service

Staging: media: remove useless dev_info to avoid null ptr dereference
authorHaneen Mohammed <hamohammed.sa@gmail.com>
Sun, 22 Mar 2015 00:02:02 +0000 (03:02 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Mar 2015 21:42:40 +0000 (22:42 +0100)
Context is used in dev_info after it has been freed.
This patch fix that issue by removing the dev_info itself,
for msg doesn't look much necessary.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/lirc/lirc_sasem.c

index 0c9e082..9e56743 100644 (file)
@@ -170,10 +170,6 @@ static void delete_context(struct sasem_context *context)
        kfree(context->driver->rbuf);
        kfree(context->driver);
        kfree(context);
-
-       if (debug)
-               dev_info(&context->dev->dev, "%s: context deleted\n",
-                        __func__);
 }
 
 static void deregister_from_lirc(struct sasem_context *context)