Skip to content

Commit

Permalink
driver core: test_async: fix an error code
Browse files Browse the repository at this point in the history
[ Upstream commit 22d2381 ]

The test_platform_device_register_node() function should return error
pointers instead of NULL.  That is what the callers are expecting.

Fixes: 57ea974 ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/1e11ed19-e1f6-43d8-b352-474134b7c008@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Sep 13, 2023
1 parent 636f5b8 commit 58a3b87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/test/test_async_driver_probe.c
Expand Up @@ -84,7 +84,7 @@ test_platform_device_register_node(char *name, int id, int nid)

pdev = platform_device_alloc(name, id);
if (!pdev)
return NULL;
return ERR_PTR(-ENOMEM);

if (nid != NUMA_NO_NODE)
set_dev_node(&pdev->dev, nid);
Expand Down

0 comments on commit 58a3b87

Please sign in to comment.