提交 d3ddad2e 编写于 作者: M Miquel Raynal 提交者: Zheng Zengkai

mtd: rawnand: arasan: Check the proposed data interface is supported

stable inclusion
from stable-v5.10.137
commit 72fae7e7f7f5336bac83698eab71edb061c292f0
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=72fae7e7f7f5336bac83698eab71edb061c292f0

--------------------------------

[ Upstream commit 4dd7ef97 ]

Check the data interface is supported in ->setup_interface() before
acknowledging the timings.
Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-3-miquel.raynal@bootlin.comSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 476556bb
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册