提交 ed533f25 编写于 作者: M Marek Szyprowski 提交者: Xie XiuQi

media: s5p-mfc: fix incorrect bus assignment in virtual child device

[ Upstream commit 1e0d0a5f ]

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 a66d9724 ("devres: Align data[] to
ARCH_KMALLOC_MINALIGN").

Fixes: c79667dd ("media: s5p-mfc: replace custom reserved memory handling code with generic one")
Reported-by: NPaweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Tested-by: NPaweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 61cc9f60
...@@ -1089,7 +1089,6 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev, ...@@ -1089,7 +1089,6 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev,
device_initialize(child); device_initialize(child);
dev_set_name(child, "%s:%s", dev_name(dev), name); dev_set_name(child, "%s:%s", dev_name(dev), name);
child->parent = dev; child->parent = dev;
child->bus = dev->bus;
child->coherent_dma_mask = dev->coherent_dma_mask; child->coherent_dma_mask = dev->coherent_dma_mask;
child->dma_mask = dev->dma_mask; child->dma_mask = dev->dma_mask;
child->release = s5p_mfc_memdev_release; child->release = s5p_mfc_memdev_release;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册