Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit babd5500 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Greg Kroah-Hartman
Browse files

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



[ Upstream commit df66617bfe87487190a60783d26175b65d2502ce ]

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.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 41deefab
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -869,6 +869,7 @@ static int rsxx_pci_probe(struct pci_dev *dev,
	card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event");
	if (!card->event_wq) {
		dev_err(CARD_TO_DEV(card), "Failed card event setup.\n");
		st = -ENOMEM;
		goto failed_event_handler;
	}