diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-09-27 15:01:53 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 14:41:36 -0600 |
commit | 54494d10031b4bc043af43251bff0d10cca6857a (patch) | |
tree | abf5cdfc387701491a255ac3548ab07418bb83ac /drivers/block/rsxx/core.c | |
parent | pktcdvd: add error handling support for add_disk() (diff) | |
download | linux-dev-54494d10031b4bc043af43251bff0d10cca6857a.tar.xz linux-dev-54494d10031b4bc043af43251bff0d10cca6857a.zip |
block/rsxx: add error handling support for add_disk()
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rsxx/core.c')
-rw-r--r-- | drivers/block/rsxx/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c index 83636714b8d7..8d9d69f5dfbc 100644 --- a/drivers/block/rsxx/core.c +++ b/drivers/block/rsxx/core.c @@ -935,7 +935,9 @@ static int rsxx_pci_probe(struct pci_dev *dev, card->size8 = 0; } - rsxx_attach_dev(card); + st = rsxx_attach_dev(card); + if (st) + goto failed_create_dev; /************* Setup Debugfs *************/ rsxx_debugfs_dev_new(card); |