[PATCH 5.4 160/408] dmaengine: dmatest: Check list for emptiness before access its last entry