mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-24 04:30:00 +07:00
[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 <sachin.kamat@linaro.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
5f3f254f7c
commit
38c602b8ed
@ -955,8 +955,8 @@ static int fimc_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
if (!fimc->drv_data || fimc->id >= fimc->drv_data->num_entities ||
|
if (!fimc->drv_data || fimc->id >= fimc->drv_data->num_entities ||
|
||||||
fimc->id < 0) {
|
fimc->id < 0) {
|
||||||
dev_err(dev, "Invalid driver data or device id (%d/%d)\n",
|
dev_err(dev, "Invalid driver data or device id (%d)\n",
|
||||||
fimc->id, fimc->drv_data->num_entities);
|
fimc->id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
if (!dev->of_node)
|
if (!dev->of_node)
|
||||||
|
Loading…
Reference in New Issue
Block a user