From: Sachin Kamat Date: Tue, 16 Apr 2013 06:02:19 +0000 (-0300) Subject: [media] exynos4-is: Fix potential null pointer dereferencing X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=38c602b8ed4ddb73c9274df1af33a6f6f7db26e1;p=openwrt%2Fstaging%2Fblogic.git [media] exynos4-is: Fix potential null pointer dereferencing 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 Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c index f25807d7bc8a..a8eaad0fc612 100644 --- a/drivers/media/platform/exynos4-is/fimc-core.c +++ b/drivers/media/platform/exynos4-is/fimc-core.c @@ -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)