Commit e49163b2 authored by Irvin Cote's avatar Irvin Cote Committed by sanglipeng
Browse files

nvme-pci: always return an ERR_PTR from nvme_pci_alloc_dev

stable inclusion
from stable-v5.10.198
commit 831f18c735e2fc16bf7bfb1ec41cc30e6be9eb0f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I987V5

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=831f18c735e2fc16bf7bfb1ec41cc30e6be9eb0f



--------------------------------

[ Upstream commit dc785d69 ]

Don't mix NULL and ERR_PTR returns.

Fixes: 2e87570b ("nvme-pci: factor out a nvme_pci_alloc_dev helper")
Signed-off-by: default avatarIrvin Cote <irvin.cote@insa-lyon.fr>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 7018d65a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment