Skip to content

Commit

Permalink
drivers/block/cciss.c:cciss_init_one(): use proper errnos
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Jens Axboe committed Jan 22, 2014
1 parent 3f7d758 commit 4336548
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -5004,7 +5004,7 @@ static int cciss_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)

i = alloc_cciss_hba(pdev);
if (i < 0)
return -1;
return -ENOMEM;

h = hba[i];
h->pdev = pdev;
Expand Down Expand Up @@ -5205,7 +5205,7 @@ static int cciss_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
pci_set_drvdata(pdev, NULL);
free_hba(h);
return -1;
return -ENODEV;
}

static void cciss_shutdown(struct pci_dev *pdev)
Expand Down

0 comments on commit 4336548

Please sign in to comment.