mtd: nand: davinci: check required ti,davinci-chipselect property

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 28 00:59:04 EST 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=05103825fc1ef9a60a45ecf95db2b60c6e09be9a
Commit:     05103825fc1ef9a60a45ecf95db2b60c6e09be9a
Parent:     f735a4d0d5b76c6035f30749c4e0aa64b3a9a74e
Author:     Ivan Khoronzhuk <ivan.khoronzhuk at ti.com>
AuthorDate: Tue Dec 17 15:36:44 2013 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Jan 3 11:22:25 2014 -0800

    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 at ti.com>
    Reviewed-by: Taras Kondratiuk <taras at ti.com>
    Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk at ti.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/davinci_nand.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 4577fb4..9eea269 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;



More information about the linux-mtd-cvs mailing list