diff options
author | Simon Glass <sjg@chromium.org> | 2019-12-29 21:19:16 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-01-07 16:02:38 -0700 |
commit | a41e6daf0555b2461b3a3ae457bf9b9626e2d855 (patch) | |
tree | f983c44db2e47a972048878e2ef9b027865c17d6 | |
parent | b2b1100a3bef7881ffeb1250a087e40d9672db26 (diff) | |
download | u-boot-a41e6daf0555b2461b3a3ae457bf9b9626e2d855.zip u-boot-a41e6daf0555b2461b3a3ae457bf9b9626e2d855.tar.gz u-boot-a41e6daf0555b2461b3a3ae457bf9b9626e2d855.tar.bz2 |
dm: core: Don't clear active flag twice when probe() fails
Remove this duplicated code, since the 'fail' label does this immediately.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | drivers/core/device.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 4e03708..2442b58 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -431,10 +431,8 @@ int device_probe(struct udevice *dev) if (drv->probe) { ret = drv->probe(dev); - if (ret) { - dev->flags &= ~DM_FLAG_ACTIVATED; + if (ret) goto fail; - } } ret = uclass_post_probe_device(dev); |