From: Simon Glass Date: Mon, 30 Dec 2019 04:19:16 +0000 (-0700) Subject: dm: core: Don't clear active flag twice when probe() fails X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=a41e6daf0555b2461b3a3ae457bf9b9626e2d855;p=u-boot.git 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 --- diff --git a/drivers/core/device.c b/drivers/core/device.c index 4e037083a6..2442b5834d 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);