mtd: atmel_nand: move the sanity check to the beginning of pmecc_enable()
authorJosh Wu <josh.wu@atmel.com>
Wed, 7 Aug 2013 09:58:11 +0000 (17:58 +0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Aug 2013 20:34:36 +0000 (21:34 +0100)
commit1fad0e8b9a8889f6ca79be570e06d00785f15aed
treed44e7bbc5ba28704feb1b65da9ee7229f0312db4
parente09f7f992833ed73f1afc5eaa7cc4d5b10b04b7c
mtd: atmel_nand: move the sanity check to the beginning of pmecc_enable()

It is better to do the sanity check for the parameter before any hardware
operation.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/atmel_nand.c