mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
media: s5p-mfc: fix incorrect bus assignment in virtual child device
[ Upstream commit1e0d0a5fd3] 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 commita66d972465("devres: Align data[] to ARCH_KMALLOC_MINALIGN"). Fixes:c79667dd93("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3ddc2a1007
commit
7821bcce20
@@ -1089,7 +1089,6 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev,
|
||||
device_initialize(child);
|
||||
dev_set_name(child, "%s:%s", dev_name(dev), name);
|
||||
child->parent = dev;
|
||||
child->bus = dev->bus;
|
||||
child->coherent_dma_mask = dev->coherent_dma_mask;
|
||||
child->dma_mask = dev->dma_mask;
|
||||
child->release = s5p_mfc_memdev_release;
|
||||
|
||||
Reference in New Issue
Block a user