From: Ivan Khoronzhuk Date: Tue, 17 Dec 2013 13:36:44 +0000 (+0200) Subject: mtd: nand: davinci: check required ti,davinci-chipselect property X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=05103825fc1ef9a60a45ecf95db2b60c6e09be9a;p=openwrt%2Fstaging%2Fblogic.git mtd: nand: davinci: check required ti,davinci-chipselect property The property "ti,davinci-chipselect" is required. So we have to check if it is set. Reviewed-by: Grygorii Strashko Reviewed-by: Taras Kondratiuk Signed-off-by: Ivan Khoronzhuk Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 4577fb41c0c7..9eea26953871 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -545,6 +545,9 @@ static struct davinci_nand_pdata if (!of_property_read_u32(pdev->dev.of_node, "ti,davinci-chipselect", &prop)) pdev->id = prop; + else + return ERR_PTR(-EINVAL); + if (!of_property_read_u32(pdev->dev.of_node, "ti,davinci-mask-ale", &prop)) pdata->mask_ale = prop;