mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
dma-buf: heaps: system_heap: fix to sg_dma_address
The rknpu driver creates a sg without page link, so sg_phys(sg) will
crash due to page null.
Fixes: 33b98bf612 ("dma-buf: system_heap: do force sync only if attachment list empty")
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I679122dd4c1663d0520429638565c6cc8b5a2c90
This commit is contained in:
@@ -239,7 +239,7 @@ static int system_heap_sgl_sync_range(struct device *dev,
|
||||
for_each_sg(sgl, sg, nents, i) {
|
||||
unsigned int sg_offset, sg_left, size = 0;
|
||||
|
||||
sg_dma_addr = sg_phys(sg);
|
||||
sg_dma_addr = sg_dma_address(sg);
|
||||
|
||||
len += sg->length;
|
||||
if (len <= offset)
|
||||
|
||||
Reference in New Issue
Block a user