dmaengine: ste_dma40: Only calculate residue if txstate exists.