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>
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",