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: HeungJun Kim <riverful.kim@xxxxxxxxxxx> Signed-off-by: Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> --- drivers/media/video/s5p-fimc/fimc-mdevice.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/video/s5p-fimc/fimc-mdevice.c b/drivers/media/video/s5p-fimc/fimc-mdevice.c index 1587498..f653259 100644 --- a/drivers/media/video/s5p-fimc/fimc-mdevice.c +++ b/drivers/media/video/s5p-fimc/fimc-mdevice.c @@ -448,6 +448,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; -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html