From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjVI9-0005ev-5Z for barebox@lists.infradead.org; Tue, 15 Jan 2019 20:26:36 +0000 Received: by mail-pf1-x441.google.com with SMTP id b85so1851378pfc.3 for ; Tue, 15 Jan 2019 12:26:32 -0800 (PST) From: Andrey Smirnov Date: Tue, 15 Jan 2019 12:25:48 -0800 Message-Id: <20190115202601.24831-5-andrew.smirnov@gmail.com> In-Reply-To: <20190115202601.24831-1-andrew.smirnov@gmail.com> References: <20190115202601.24831-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v3 04/17] base: driver: Drop redundant list_empty() check To: barebox@lists.infradead.org Cc: Andrey Smirnov Signed-off-by: Andrey Smirnov --- drivers/base/driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 1fd890542e..1fd6bbc014 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -269,7 +269,7 @@ static int device_probe_deferred(void) success = false; if (list_empty(&deferred)) - break; + return 0; list_for_each_entry_safe(dev, tmp, &deferred, active) { list_del(&dev->active); @@ -285,9 +285,6 @@ static int device_probe_deferred(void) } } while (success); - if (list_empty(&deferred)) - return 0; - list_for_each_entry(dev, &deferred, active) dev_err(dev, "probe permanently deferred\n"); -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox