page_pool: fix incorrect mp_ops error handling
Minor fix to the memory provider error handling, we should be jumping to
free_ptr_ring in this error case rather than returning directly.
Found by code-inspection.
Cc: skhawaja@google.com
Fixes: b400f4b874 ("page_pool: Set `dma_sync` to false for devmem memory provider")
Signed-off-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Samiullah Khawaja <skhawaja@google.com>
Link: https://patch.msgid.link/20250821030349.705244-1-almasrymina@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
pull/1334/head
parent
01b9128c5d
commit
abadf0ff63
|
|
@ -287,8 +287,10 @@ static int page_pool_init(struct page_pool *pool,
|
|||
}
|
||||
|
||||
if (pool->mp_ops) {
|
||||
if (!pool->dma_map || !pool->dma_sync)
|
||||
return -EOPNOTSUPP;
|
||||
if (!pool->dma_map || !pool->dma_sync) {
|
||||
err = -EOPNOTSUPP;
|
||||
goto free_ptr_ring;
|
||||
}
|
||||
|
||||
if (WARN_ON(!is_kernel_rodata((unsigned long)pool->mp_ops))) {
|
||||
err = -EFAULT;
|
||||
|
|
|
|||
Loading…
Reference in New Issue