Browse Source

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>
Simon Glass 4 years ago
parent
commit
a41e6daf05
1 changed files with 1 additions and 3 deletions
  1. 1 3
      drivers/core/device.c

+ 1 - 3
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);