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

Configure Feed

Select the types of activity you want to include in your feed.

driver core: auxiliary bus: Fix IS_ERR() vs NULL mixup in __devm_auxiliary_device_create()

This code was originally going to use error pointers but we decided it
should return NULL instead. The error pointer code in
__devm_auxiliary_device_create() was left over from the first version.
Update it to use NULL. No callers have been merged yet, so that makes
this change simple and self contained.

Fixes: eaa0d30216c1 ("driver core: auxiliary bus: add device creation helpers")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Leon Romanovsky <leon@kernel.org>
Link: https://lore.kernel.org/r/aAi7Kg3aTguFD0fU@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
2806c6b8 8117b017

+3 -3
+3 -3
drivers/base/auxiliary.c
··· 481 481 int ret; 482 482 483 483 auxdev = auxiliary_device_create(dev, modname, devname, platform_data, id); 484 - if (IS_ERR(auxdev)) 485 - return auxdev; 484 + if (!auxdev) 485 + return NULL; 486 486 487 487 ret = devm_add_action_or_reset(dev, auxiliary_device_destroy, 488 488 auxdev); 489 489 if (ret) 490 - return ERR_PTR(ret); 490 + return NULL; 491 491 492 492 return auxdev; 493 493 }