]> git.baikalelectronics.ru Git - kernel.git/commit
[media] s5p-fimc: Avoid crash with null platform_data
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Mon, 30 Apr 2012 15:10:58 +0000 (12:10 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 20 May 2012 12:14:11 +0000 (09:14 -0300)
commit6df68d2874d675a2d71b55a7bc168fd544b5dd53
treec2782e2532227597db4c8c765b861270743ae705
parent02deeecf5732670002cff67abcdd60ae9b40ab1e
[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: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-fimc/fimc-mdevice.c