Commit df66617b authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Jens Axboe

block: rsxx: fix error return code of rsxx_pci_probe()

When create_singlethread_workqueue returns NULL to card->event_wq, no
error return code of rsxx_pci_probe() is assigned.

To fix this bug, st is assigned with -ENOMEM in this case.

Fixes: 8722ff8c ("block: IBM RamSan 70/80 device driver")
Reported-by: default avatarTOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20210310033017.4023-1-baijiaju1990@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent faa44c69
...@@ -871,6 +871,7 @@ static int rsxx_pci_probe(struct pci_dev *dev, ...@@ -871,6 +871,7 @@ static int rsxx_pci_probe(struct pci_dev *dev,
card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event"); card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event");
if (!card->event_wq) { if (!card->event_wq) {
dev_err(CARD_TO_DEV(card), "Failed card event setup.\n"); dev_err(CARD_TO_DEV(card), "Failed card event setup.\n");
st = -ENOMEM;
goto failed_event_handler; goto failed_event_handler;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment