umem: fix error return code in mm_pci_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 8 Mar 2021 12:35:01 +0000 (12:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:31:50 +0000 (14:31 +0200)
commit58b34195b33f675c6bdd49319d4403fe5ae8f422
treee680ace951e208047d9763ff8f04329e7411baaf
parentfeaa91193ad38d1cdeea0fa5e1ec1eeaf1fc9a36
umem: fix error return code in mm_pci_probe()

[ Upstream commit eeb05595d22c19c8f814ff893dcf88ec277a2365 ]

Fix to return negative error code -ENOMEM from the blk_alloc_queue()
and dma_alloc_coherent() error handling cases instead of 0, as done
elsewhere in this function.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210308123501.2573816-1-weiyongjun1@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/umem.c