]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: s5p-mfc: fix incorrect bus assignment in virtual child device
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 7 Jan 2019 12:04:14 +0000 (07:04 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit450713d0ac6f6e0ea923072d64d08d222140b63d
treee481db90a333217fa7cd6e482a922d0da4c677d8
parent37f932c96027534ce91c330d9f3484d6271f6bde
media: s5p-mfc: fix incorrect bus assignment in virtual child device

BugLink: https://bugs.launchpad.net/bugs/1838824
[ Upstream commit 1e0d0a5fd38192f23304ea2fc2b531fea7c74247 ]

Virtual MFC codec's child devices must not be assigned to platform bus,
because they are allocated as raw 'struct device' and don't have the
corresponding 'platform' part. This fixes NULL pointer access revealed
recently by commit a66d972465d1 ("devres: Align data[] to
ARCH_KMALLOC_MINALIGN").

Fixes: c79667dd93b0 ("media: s5p-mfc: replace custom reserved memory handling code with generic one")
Reported-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c