]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drivers/block/cciss.c:cciss_init_one(): use proper errnos
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 21 Jan 2014 22:39:23 +0000 (14:39 -0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 22 Jan 2014 04:16:56 +0000 (20:16 -0800)
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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/cciss.c

index b35fc4f5237c3b44c7c51aaa0517e58a42a2ab81..036e8ab86c718057ae01c9f6bf3ba6c403a6b942 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)