Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: test_async: fix an error code

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

Fixes: 57ea974fb871 ("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>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
22d2381b 9e0cace7

+1 -1
+1 -1
drivers/base/test/test_async_driver_probe.c
··· 84 84 85 85 pdev = platform_device_alloc(name, id); 86 86 if (!pdev) 87 - return NULL; 87 + return ERR_PTR(-ENOMEM); 88 88 89 89 if (nid != NUMA_NO_NODE) 90 90 set_dev_node(&pdev->dev, nid);