hpsa: pass error from pci_set_consistent_dma_mask from hpsa_message
authorRobert Elliott <elliott@hp.com>
Fri, 23 Jan 2015 22:42:37 +0000 (16:42 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 2 Feb 2015 17:57:38 +0000 (09:57 -0800)
Return the actual error code instead of a generic error code.

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/hpsa.c

index f29f569..64d17d1 100644 (file)
@@ -5610,7 +5610,7 @@ static int hpsa_message(struct pci_dev *pdev, unsigned char opcode,
        err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err) {
                iounmap(vaddr);
-               return -ENOMEM;
+               return err;
        }
 
        cmd = pci_alloc_consistent(pdev, cmd_sz, &paddr64);