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

Maoyi Xie posted 2 patches 3 days, 4 hours ago
drivers/dma/mpc512x_dma.c | 4 ++--
drivers/dma/sh/rz-dmac.c  | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
[PATCH 0/2] dmaengine: fix dead empty checks in mpc512x and rz-dmac
Posted by Maoyi Xie 3 days, 4 hours ago
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