diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-11-02 23:02:50 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-11-13 12:06:47 +0100 |
commit | 354dbdcbdd79ec417f6c35f55b1fe6310e7dd431 (patch) | |
tree | 33a45ef6ba413d0aac1e2aa78e2a3ff5d3b1ea6e /drivers | |
parent | 160c0b7f9a166d62a3aa32853883666eda896c58 (diff) | |
download | linux-354dbdcbdd79ec417f6c35f55b1fe6310e7dd431.tar.gz linux-354dbdcbdd79ec417f6c35f55b1fe6310e7dd431.tar.bz2 linux-354dbdcbdd79ec417f6c35f55b1fe6310e7dd431.zip |
mtd: rawnand: txx9ndfmc: Drop if block with always false condition
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20231102220246.3336154-9-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/raw/txx9ndfmc.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/txx9ndfmc.c b/drivers/mtd/nand/raw/txx9ndfmc.c index 9d6c62f73bb7..fdcdfbea0cbd 100644 --- a/drivers/mtd/nand/raw/txx9ndfmc.c +++ b/drivers/mtd/nand/raw/txx9ndfmc.c @@ -374,8 +374,6 @@ static int 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; |