[PATCH for 4.14,4.19,5.4] dmaengine: sh: rcar-dmac: Check for error num after dma_set_max_seg_size