Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp7189814pxv; Fri, 30 Jul 2021 12:12:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybMFBEuYr/Qlkc0aRKHNmf45TTcJTnaOfEDppweuRMQXJL6b3Gm1IlTvJHLP82KeDmZMoM X-Received: by 2002:a05:6402:3551:: with SMTP id f17mr4821540edd.223.1627672356379; Fri, 30 Jul 2021 12:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627672356; cv=none; d=google.com; s=arc-20160816; b=ePqYwNcZ+U2H4XAFo5gE6KvoObskJT8Ys/keo8MAgFmMR8mssMB+hFaidRHQy1aTCU oMQ63cTENAeTdpcC+rHdces/jwAYkHWLq1HQNNd2zAZF8Ou3Y6rJMcSFLq4/EH5dbo3X +Q2i90svFRj1mBn13sPHvU/JyipKfDANofWNebSDIhAbn8R2G7AON6O10NLEbnfKE52B do7wJ61GeICT6Gd89L3Q9WdHWJEt/6G2V34kBJH9ly6rtojVI3nSY6P+BMxnGZjYuzTl tFVm/x2fItyPWVFaM5iP5VpD07HkaFWNChiZUl/iNdSqqym6eVN9JLgowp4P4rJYpXSX +DdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=iW97N1mdJ3qVywuoaH155ixyVOC5QaMQ5wQGoPImdKA=; b=bnaUlYOcf8wLS+JPYfaTqJ/343UsiL/x78+owSGpGMOymQk2wuWikZOESWrxQ2VRha OUfj4DPxbTCM2s71BIJuG/L+VyzdWARS0+08ep3hkmCWTA0oMX8cYeP2sPm0zjog+orW SI2nZpV7/Aa1aTaieE+LwXukaO3wlwuBtgbRmjPDXxZxji5i8BOwxFBYc1c1xTg/9A03 I8bp09I543DB2TzOxh/iyIECyKHRXCyv8N4n6jAgkAqmcwRr4/KbgpgZ8B61mXw2vGlV llEEv8DSLnMkBakQGDyw2v1ewV2TLIuiWMpgU/RDN2VwTx5LFIuFQzBindDuArNZA1W1 Vecg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dx17si2525436ejb.532.2021.07.30.12.12.12; Fri, 30 Jul 2021 12:12:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231140AbhG3TK6 (ORCPT + 99 others); Fri, 30 Jul 2021 15:10:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbhG3TK5 (ORCPT ); Fri, 30 Jul 2021 15:10:57 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E131C061796 for ; Fri, 30 Jul 2021 12:10:44 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9Xu6-00068f-Mc; Fri, 30 Jul 2021 21:10:42 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m9Xu5-0005yk-UY; Fri, 30 Jul 2021 21:10:41 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1m9Xu5-0007KV-To; Fri, 30 Jul 2021 21:10:41 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de, Finn Thain , linux-m68k@lists.linux-m68k.org Subject: [PATCH v2 1/4] nubus: Simplify check in remove callback Date: Fri, 30 Jul 2021 21:10:32 +0200 Message-Id: <20210730191035.1455248-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210730191035.1455248-1-u.kleine-koenig@pengutronix.de> References: <20210730191035.1455248-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Patch-Hashes: v=1; h=sha256; i=TjLBJt0QGxFmp7SpMOjzQEIkuFPLuMwSswChhiWQZSU=; m=qsAB52XGlHgDkCXw/bmGf7NdcrsOl5sRO45qYx4/rUE=; p=Y7UBaaGsszQzvtKk/Xj3uSk938y5pFeeoLuZiSQOfmc=; g=c25b7253ee9694e5d77118adf90c05984d48eb27 X-Patch-Sig: m=pgp; i=u.kleine-koenig@pengutronix.de; s=0x0D2511F322BFAB1C1580266BE2DCDD9132669BD6; b=iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmEETp4ACgkQwfwUeK3K7An4rgf/S7c 9q0QjNEdQrzp5+trJO4rJhJvFza/BMJNIfMteBrYj63Rvc/8lQfiNOiL5VhAfUWxqyy3SljCxtU5h yUDAMFJFAEgEDg3XbsblQQu6zTRFvXGFaE0OePb7xJZL185iEvKGTOuAvDTnBjNQZLQ6hRI46xeOA VzY3OX6mM9MsvhhZhqzcTFdEkVew3Z5k57DZh3/hZoL+yW6XVHI/Ts9B511w7AQv9Ot31dJvezdB5 rf8vUazcJndbUXS0QmO19+BSXRWJmq3zPI9/EmOZPxJmyoojgbFbFRq9g8dpKq5brnR/So6U+CEY0 lEZ6ueTbBJmoSRawU1V2qC3BOtCn6PA== Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver core only calls a remove callback when the device was successfully bound (aka probed) before. So dev->driver is never NULL and the respective check can just be dropped. Signed-off-by: Uwe Kleine-König --- drivers/nubus/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c index d9d04f27f89b..17fad660032c 100644 --- a/drivers/nubus/bus.c +++ b/drivers/nubus/bus.c @@ -33,7 +33,7 @@ static void nubus_device_remove(struct device *dev) { struct nubus_driver *ndrv = to_nubus_driver(dev->driver); - if (dev->driver && ndrv->remove) + if (ndrv->remove) ndrv->remove(to_nubus_board(dev)); } -- 2.30.2