[media] s5p-tv: Fix potential NULL pointer dereference error
authorSachin Kamat <sachin.kamat@linaro.org>
Sat, 22 Sep 2012 06:39:19 +0000 (03:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 2 Oct 2012 17:02:03 +0000 (14:02 -0300)
When mdev is NULL, the error print statement will try to dereference
the NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/s5p-tv/mixer_drv.c

index a15ca0595b870a5d6d69d7aa68f9844f9179f399..ca0f2971744851e6ee9770fcc3227ad8c699be72 100644 (file)
@@ -384,7 +384,7 @@ static int __devinit mxr_probe(struct platform_device *pdev)
 
        mdev = kzalloc(sizeof *mdev, GFP_KERNEL);
        if (!mdev) {
-               mxr_err(mdev, "not enough memory.\n");
+               dev_err(dev, "not enough memory.\n");
                ret = -ENOMEM;
                goto fail;
        }