dm: core: Don't clear active flag twice when probe() fails 37/268137/1
authorSimon Glass <sjg@chromium.org>
Mon, 30 Dec 2019 04:19:16 +0000 (21:19 -0700)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 16 Dec 2021 11:38:14 +0000 (20:38 +0900)
Remove this duplicated code, since the 'fail' label does this immediately.

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

index b46af87..88f26b3 100644 (file)
@@ -423,10 +423,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);