[PATCH 0/2] dmaengine: fix dead empty checks in mpc512x and rz-dmac

From: Maoyi Xie

Date: Thu May 21 2026 - 11:52:43 EST


Two dmaengine drivers use list_first_entry() and then test the
returned pointer against NULL. list_first_entry() never returns
NULL, so the NULL check is dead code. The author intent at both
sites was clear from the existing recovery path. Switch to
list_first_entry_or_null() so the existing NULL path runs.

The two sites were raised in an inquiry on 2026-05-20. Frank Li
confirmed and asked for a patch.

Maoyi Xie (2):
dmaengine: mpc512x: fix dead empty check in mpc_dma_prep_slave_sg()
dmaengine: rz-dmac: fix dead empty check in rz_dmac_chan_get_residue()

drivers/dma/mpc512x_dma.c | 4 ++--
drivers/dma/sh/rz-dmac.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

--
2.34.1