aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-02-17 15:03:08 -0500
committerBrian Norris <computersforpeace@gmail.com>2014-03-11 01:42:27 -0400
commitc69dbbf3335a21aae74376d7e5db50a486d52439 (patch)
tree799731962c7b5717681a4a5e0484fe5eab4e08fe /drivers/mtd/nand
parentffdac6cdd9f4c561fc49192c1ea1570f475659e9 (diff)
mtd: nuc900_nand: NULL dereference in nuc900_nand_enable()
Instead of writing to "nand->reg + REG_FMICSR" we write to "REG_FMICSR" which is NULL and not a valid register. Fixes: 8bff82cbc308 ('mtd: add nand support for w90p910 (v2)') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nuc900_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nuc900_nand.c b/drivers/mtd/nand/nuc900_nand.c
index 331fccbdde61..e8a5fffd6ab2 100644
--- a/drivers/mtd/nand/nuc900_nand.c
+++ b/drivers/mtd/nand/nuc900_nand.c
@@ -225,7 +225,7 @@ static void nuc900_nand_enable(struct nuc900_nand *nand)
225 val = __raw_readl(nand->reg + REG_FMICSR); 225 val = __raw_readl(nand->reg + REG_FMICSR);
226 226
227 if (!(val & NAND_EN)) 227 if (!(val & NAND_EN))
228 __raw_writel(val | NAND_EN, REG_FMICSR); 228 __raw_writel(val | NAND_EN, nand->reg + REG_FMICSR);
229 229
230 val = __raw_readl(nand->reg + REG_SMCSR); 230 val = __raw_readl(nand->reg + REG_SMCSR);
231 231