aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/nand_util.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2018-08-16 17:30:01 +0200
committerJagan Teki <jagan@amarulasolutions.com>2018-09-20 20:10:49 +0530
commit8fad769f1eab88a2bcf0b714694158968f58715a (patch)
tree1ba5bf66ac3327c1365de7844269ad4060217d56 /drivers/mtd/nand/raw/nand_util.c
parent5f50d82d8918b711717b4bbd96c6f348eb6e2a2c (diff)
mtd: Add sanity checks in mtd_write/read_oob()
Unlike what's done in mtd_read/write(), there are no checks to make sure the parameters passed to mtd_read/write_oob() are consistent, which forces implementers of ->_read/write_oob() to do it, which in turn leads to code duplication and possibly errors in the logic. Do general sanity checks, like ops fields consistency and range checking. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Peter Pan <peterpandong@micron.com> Signed-off-by: Richard Weinberger <richard@nod.at> [Miquel: squashed the fix about the chip's size check] Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/nand_util.c')
0 files changed, 0 insertions, 0 deletions