diff options
author | 2013-12-17 15:36:44 +0200 | |
---|---|---|
committer | 2014-01-03 11:22:25 -0800 | |
commit | 05103825fc1ef9a60a45ecf95db2b60c6e09be9a (patch) | |
tree | 9d307c6c381175c36704f3dfe98f9b9e2956533d | |
parent | mtd: nand: davinci: return ENOMEM if memory allocation is failed (diff) | |
download | linux-dev-05103825fc1ef9a60a45ecf95db2b60c6e09be9a.tar.xz linux-dev-05103825fc1ef9a60a45ecf95db2b60c6e09be9a.zip |
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 <grygorii.strashko@ti.com>
Reviewed-by: Taras Kondratiuk <taras@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r-- | drivers/mtd/nand/davinci_nand.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |