Skip to content

Commit 4336548

Browse files
akpm00axboe
authored andcommitted
drivers/block/cciss.c:cciss_init_one(): use proper errnos
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>
1 parent 3f7d758 commit 4336548

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/block/cciss.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5004,7 +5004,7 @@ static int cciss_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
50045004

50055005
i = alloc_cciss_hba(pdev);
50065006
if (i < 0)
5007-
return -1;
5007+
return -ENOMEM;
50085008

50095009
h = hba[i];
50105010
h->pdev = pdev;
@@ -5205,7 +5205,7 @@ static int cciss_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
52055205
*/
52065206
pci_set_drvdata(pdev, NULL);
52075207
free_hba(h);
5208-
return -1;
5208+
return -ENODEV;
52095209
}
52105210

52115211
static void cciss_shutdown(struct pci_dev *pdev)

0 commit comments

Comments
 (0)