Skip to content
Commit 5cdd929d authored by Boris Brezillon's avatar Boris Brezillon Committed by Richard Weinberger
Browse files

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: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Cc: Peter Pan <peterpandong@micron.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 9a594108
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment