forked from Minki/linux
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: 8bff82cbc3
('mtd: add nand support for w90p910 (v2)')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
parent
ffdac6cdd9
commit
c69dbbf333
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user