提交 41df5bf0 编写于 作者: S Sylwester Nawrocki 提交者: Mauro Carvalho Chehab

[media] s5p-fimc: Avoid crash with null platform_data

In commit "s5p-fimc: Handle sub-device interdependencies using deferred.."
there was a check added for pdata->num_clients without first checking
pdata against NULL. This causes a crash when platform_data is not set,
which is a valid use case. Fix this regression by skipping the MIPI-CSIS
subdev registration also when pdata is null.
Reported-by: NHeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 d310f478
......@@ -371,6 +371,8 @@ static int fimc_md_register_platform_entities(struct fimc_md *fmd)
* Check if there is any sensor on the MIPI-CSI2 bus and
* if not skip the s5p-csis module loading.
*/
if (pdata == NULL)
return 0;
for (i = 0; i < pdata->num_clients; i++) {
if (pdata->isp_info[i].bus_type == FIMC_MIPI_CSI2) {
ret = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册