dm: core: Switch uclass_*_device_err to use uclass_*_device_check

Clarify documentation, fix a few more cases that could be broken by the
change.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
This commit is contained in:
Michal Suchanek
2022-09-25 13:08:16 +02:00
committed by Simon Glass
parent 6b08fb5cc4
commit 58ddb937e1
3 changed files with 20 additions and 9 deletions

View File

@@ -16,7 +16,15 @@ struct sysinfo_priv {
int sysinfo_get(struct udevice **devp)
{
return uclass_first_device_err(UCLASS_SYSINFO, devp);
int ret = uclass_first_device_err(UCLASS_SYSINFO, devp);
/*
* There is some very dodgy error handling in gazerbeam,
* do not return a device on error.
*/
if (ret)
*devp = NULL;
return ret;
}
int sysinfo_detect(struct udevice *dev)