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

Commit c81e46a8 authored by Pratyush Yadav's avatar Pratyush Yadav Committed by Greg Kroah-Hartman
Browse files

nvme-pci: do not set the NUMA node of device if it has none



[ Upstream commit dad651b2a44eb6b201738f810254279dca29d30d ]

If a device has no NUMA node information associated with it, the driver
puts the device in node first_memory_node (say node 0). Not having a
NUMA node and being associated with node 0 are completely different
things and it makes little sense to mix the two.

Signed-off-by: default avatarPratyush Yadav <ptyadav@amazon.de>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5493dca0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2501,8 +2501,6 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
	size_t alloc_size;

	node = dev_to_node(&pdev->dev);
	if (node == NUMA_NO_NODE)
		set_dev_node(&pdev->dev, first_memory_node);

	dev = kzalloc_node(sizeof(*dev), GFP_KERNEL, node);
	if (!dev)