scsi_dma_map() was reporting a failure during boot on an AMD machine
with the IOMMU enabled.
scsi_dma_map failed: request for 36 bytes!
The issue was tracked down to a mistake in logic: should not return
an error if iommu_deferred_attach() returns zero.
Reported-by: Marshall Midden<marshallmidden@xxxxxxxxx>
Fixes: dabb16f67215 ("iommu/dma: return error code from iommu_dma_map_sg()")
Link:https://lore.kernel.org/all/CAD2CkAWjS8=kKwEEN4cgVNjyFORUibzEiCUA-X+SMtbo0JoMmA@xxxxxxxxxxxxxx
Signed-off-by: Logan Gunthorpe<logang@xxxxxxxxxxxx>
Cc: Joerg Roedel<joro@xxxxxxxxxx>
Cc: Will Deacon<will@xxxxxxxxxx>