Skip to content

Commit

Permalink
mtd: nuc900_nand: NULL dereference in nuc900_nand_enable()
Browse files Browse the repository at this point in the history
Instead of writing to "nand->reg + REG_FMICSR" we write to "REG_FMICSR"
which is NULL and not a valid register.

Fixes: 8bff82c ('mtd: add nand support for w90p910 (v2)')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Dan Carpenter authored and Brian Norris committed Mar 11, 2014
1 parent ffdac6c commit c69dbbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/nuc900_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static void nuc900_nand_enable(struct nuc900_nand *nand)
val = __raw_readl(nand->reg + REG_FMICSR);

if (!(val & NAND_EN))
__raw_writel(val | NAND_EN, REG_FMICSR);
__raw_writel(val | NAND_EN, nand->reg + REG_FMICSR);

val = __raw_readl(nand->reg + REG_SMCSR);

Expand Down

0 comments on commit c69dbbf

Please sign in to comment.