[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220819153849.921260433@linuxfoundation.org>
Date: Fri, 19 Aug 2022 17:43:49 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Miquel Raynal <miquel.raynal@...tlin.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.10 459/545] mtd: rawnand: arasan: Check the proposed data interface is supported
From: Miquel Raynal <miquel.raynal@...tlin.com>
[ Upstream commit 4dd7ef970bee8a93e1817ec028a7e26aef046d0d ]
Check the data interface is supported in ->setup_interface() before
acknowledging the timings.
Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-3-miquel.raynal@bootlin.com
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/mtd/nand/raw/arasan-nand-controller.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c
index cea57de5e6cd..f9fb3b7a3ec3 100644
--- a/drivers/mtd/nand/raw/arasan-nand-controller.c
+++ b/drivers/mtd/nand/raw/arasan-nand-controller.c
@@ -884,6 +884,11 @@ static int anfc_setup_interface(struct nand_chip *chip, int target,
struct anand *anand = to_anand(chip);
struct arasan_nfc *nfc = to_anfc(chip->controller);
struct device_node *np = nfc->dev->of_node;
+ const struct nand_sdr_timings *sdr;
+
+ sdr = nand_get_sdr_timings(conf);
+ if (IS_ERR(sdr))
+ return PTR_ERR(sdr);
if (target < 0)
return 0;
--
2.35.1
Powered by blists - more mailing lists