dm: core: Don't clear active flag twice when probe() fails
authorSimon Glass <sjg@chromium.org>
Mon, 30 Dec 2019 04:19:16 +0000 (21:19 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 7 Jan 2020 23:02:38 +0000 (16:02 -0700)
Remove this duplicated code, since the 'fail' label does this immediately.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/device.c

index 4e037083a6374a11d9c73fd6f5e27a803ca9154a..2442b5834d57faa90a06c4a6edc91dad68afe85b 100644 (file)
@@ -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);