From patchwork Sun Oct 8 20:01:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 1844958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LgGEfoMN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S3Y4B4TNGz20Vh for ; Mon, 9 Oct 2023 07:02:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KPsMQs1nELIsyuXR/QZyZ19dNPWnnbBpPkDL8BVWuuQ=; b=LgGEfoMNQjwcHN pkHt7we6la2n/Xb1alC/ow8/iqbAXM6zldLXuP5Sg3gP7f/8g5uxt3gZYbEWMhFD6Nj4Ct/HDgPY6 DIF0LnA9cXjaVSYvTA2vm5QzWUkhu6FGhvXWxK2Nd/7EZrgE3S6AeY6KtRgKyF+EhUimbHyyXcIGM ejVYjdpa4eO4cbr7x0OEuPggneLCwXQXazm47ViNPuo5eym8uIeXwB0n10d9jJdjLy957YjQLnOQ+ fjI6FexShwuviIxtLHqkrGKpW16bH7UiD8cS7BkVsyQx8WZC+RF0HRdzRyffJiC9FNo92QXWFdyOF vC9dk15rGQ5vuSc5ixBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qpZyc-009Dx1-37; Sun, 08 Oct 2023 20:02:10 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qpZyV-009Dqr-2D for linux-mtd@lists.infradead.org; Sun, 08 Oct 2023 20:02:07 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qpZyM-0001S8-4w; Sun, 08 Oct 2023 22:01:54 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qpZyL-000EzE-K3; Sun, 08 Oct 2023 22:01:53 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qpZyL-00Bf03-B0; Sun, 08 Oct 2023 22:01:53 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 02/20] mtd: rawnand: txx9ndfmc: Drop if block with always false condition Date: Sun, 8 Oct 2023 22:01:25 +0200 Message-Id: <20231008200143.196369-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231008200143.196369-1-u.kleine-koenig@pengutronix.de> References: <20231008200143.196369-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=961; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=xY4iFlBn+hA89YIz+7BM4iDNw+9PSlnUUQWNlfeNif4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlIwp7MlxrTM1knwjZE8C19e4mfq1I6PLEE7mAs n5q+/8IoLOJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZSMKewAKCRCPgPtYfRL+ Tv96CACQU6OjG+WM+qcRk9cQj0hMJ5L4mqHHeoTYpdZBCQgZLPuU+T9f0IepfT4UM1PaFe93RYC muswZ8OY3JM0irVwDF0CyyDCEWcfKh7K12ZF1JNuhgbsMrPK+dIi3tnqfQmZNUsYHv5ra746yVW BJgGzCruUnxsV/prPv63dCNnKP3Ca7LYQEQpTfUhQ3Y4qevT2rCtF1JUOYkWN/rl4BY15Pyf3pn GV25WG5KJqg2md2KhiVI2v6II4nWwKZNE5DeH+PN+/CgH5JXKlteLvhLvT5fJo+YbaVuZcYveTh ZZBPQm+glGExf38jmne7LhfxpRZs4qZ3q4at5hwLXnAT9sND X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mtd@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231008_130203_720411_2123B98B X-CRM114-Status: GOOD ( 11.49 ) X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: txx9ndfmc_remove() is only called after txx9ndfmc_probe() completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so platform_get_drvdata() won't return NUL [...] Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2a0a:edc0:2:b01:1d:0:0:104 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org txx9ndfmc_remove() is only called after txx9ndfmc_probe() completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so platform_get_drvdata() won't return NULL. Simplify by removing the if block with the always false condition. Signed-off-by: Uwe Kleine-König --- drivers/mtd/nand/raw/txx9ndfmc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mtd/nand/raw/txx9ndfmc.c b/drivers/mtd/nand/raw/txx9ndfmc.c index aff9d6f16851..83dd092d22ee 100644 --- a/drivers/mtd/nand/raw/txx9ndfmc.c +++ b/drivers/mtd/nand/raw/txx9ndfmc.c @@ -374,8 +374,6 @@ static int __exit txx9ndfmc_remove(struct platform_device *dev) struct txx9ndfmc_drvdata *drvdata = platform_get_drvdata(dev); int ret, i; - if (!drvdata) - return 0; for (i = 0; i < MAX_TXX9NDFMC_DEV; i++) { struct mtd_info *mtd = drvdata->mtds[i]; struct nand_chip *chip;