From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Maxim Levitsky <maximlevitsky@gmail.com>,
Alex Dubov <oakad@yahoo.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH 1/3] memstick: rtsx_pci_ms: Drop if block with always false condition
Date: Wed, 10 Apr 2024 16:05:48 +0200 [thread overview]
Message-ID: <dd0d06ca9388fd8f6a3a8bb57354baaeaf56800a.1712757795.git.u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <cover.1712757795.git.u.kleine-koenig@pengutronix.de>
rtsx_pci_ms_drv_remove() is only called after rtsx_pci_ms_drv_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 <u.kleine-koenig@pengutronix.de>
---
drivers/memstick/host/rtsx_pci_ms.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/memstick/host/rtsx_pci_ms.c b/drivers/memstick/host/rtsx_pci_ms.c
index 15720a4afac2..7c6dba6de230 100644
--- a/drivers/memstick/host/rtsx_pci_ms.c
+++ b/drivers/memstick/host/rtsx_pci_ms.c
@@ -581,9 +581,6 @@ static int rtsx_pci_ms_drv_remove(struct platform_device *pdev)
struct memstick_host *msh;
int rc;
- if (!host)
- return 0;
-
pcr = host->pcr;
pcr->slots[RTSX_MS_CARD].p_dev = NULL;
pcr->slots[RTSX_MS_CARD].card_event = NULL;
--
2.43.0
next prev parent reply other threads:[~2024-04-10 14:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 14:05 [PATCH 0/3] memstick: Convert to platform remove callback returning void Uwe Kleine-König
2024-04-10 14:05 ` Uwe Kleine-König [this message]
2024-04-10 14:05 ` [PATCH 2/3] memstick: rtsx_pci_ms: " Uwe Kleine-König
2024-04-10 14:05 ` [PATCH 3/3] memstick: rtsx_usb_ms: " Uwe Kleine-König
2024-04-25 16:21 ` [PATCH 0/3] memstick: " Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd0d06ca9388fd8f6a3a8bb57354baaeaf56800a.1712757795.git.u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-mmc@vger.kernel.org \
--cc=maximlevitsky@gmail.com \
--cc=oakad@yahoo.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).