dev->of_node could be NULL. Hence check for the same and return before dereferencing it in the subsequent error message.
Signed-off-by: Sachin Kamat <sachin.ka...@linaro.org> --- drivers/media/platform/exynos4-is/fimc-lite.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 08fbfed..214bde2 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -1513,6 +1513,9 @@ static int fimc_lite_probe(struct platform_device *pdev) if (of_id) drv_data = (struct flite_drvdata *)of_id->data; fimc->index = of_alias_get_id(dev->of_node, "fimc-lite"); + } else { + dev_err(dev, "device node not found\n"); + return -EINVAL; } if (!drv_data || fimc->index >= drv_data->num_instances || -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html