]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/block/cciss.c:cciss_init_one(): use proper errnos
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 5 Nov 2013 05:55:19 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:19 +0000 (16:55 +1100)
pci_driver.probe should return a meaningful errno, not -1.

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/cciss.c

index 0c004ac05811de58b3a0cf49e7a3558010de7187..6b0db443861854f2784418f131d194a849a32537 100644 (file)
@@ -5004,7 +5004,7 @@ reinit_after_soft_reset:
 
        i = alloc_cciss_hba(pdev);
        if (i < 0)
-               return -1;
+               return -ENOMEM;
 
        h = hba[i];
        h->pdev = pdev;
@@ -5205,7 +5205,7 @@ clean_no_release_regions:
         */
        pci_set_drvdata(pdev, NULL);
        free_hba(h);
-       return -1;
+       return -ENODEV;
 }
 
 static void cciss_shutdown(struct pci_dev *pdev)