mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
dm: core: Correct error handling when event fails
Follow the correct path in device_probe() when and event handler fails. This avoids getting into a strange state where the device appears to be activated but is not. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
fbd644e702
commit
c837a1423c
1 changed files with 2 additions and 1 deletions
|
@ -598,9 +598,10 @@ int device_probe(struct udevice *dev)
|
|||
|
||||
ret = device_notify(dev, EVT_DM_POST_PROBE);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto fail_event;
|
||||
|
||||
return 0;
|
||||
fail_event:
|
||||
fail_uclass:
|
||||
if (device_remove(dev, DM_REMOVE_NORMAL)) {
|
||||
dm_warn("%s: Device '%s' failed to remove on error path\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue