[media] exynos4-is: Fix potential null pointer dereferencing
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 16 Apr 2013 06:02:19 +0000 (03:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 25 Apr 2013 12:32:57 +0000 (09:32 -0300)
If fimc->drv_data is NULL, then fimc->drv_data->num_entities would
cause NULL pointer dereferencing. Hence remove it from print statement.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/exynos4-is/fimc-core.c

index f25807d7bc8add6630661f38f3d293206b234ea2..a8eaad0fc612b77a4dbb2752f41c2761387e45ce 100644 (file)
@@ -955,8 +955,8 @@ static int fimc_probe(struct platform_device *pdev)
        }
        if (!fimc->drv_data || fimc->id >= fimc->drv_data->num_entities ||
            fimc->id < 0) {
-               dev_err(dev, "Invalid driver data or device id (%d/%d)\n",
-                       fimc->id, fimc->drv_data->num_entities);
+               dev_err(dev, "Invalid driver data or device id (%d)\n",
+                       fimc->id);
                return -EINVAL;
        }
        if (!dev->of_node)