OSDN Git Service

mtd: rawnand: make subop helpers return unsigned values
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jul 2018 22:09:12 +0000 (00:09 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 31 Jul 2018 07:45:51 +0000 (09:45 +0200)
commit760c435e0f85ed19e48a90d746ce1de2cd02def7
treedb479cbf16f6e056c1427b6cbfa54f50c5c8d06b
parentd166541e9031daff120cac212f1917eff93c07d3
mtd: rawnand: make subop helpers return unsigned values

A report from Colin Ian King pointed a CoverityScan issue where error
values on these helpers where not checked in the drivers. These
helpers can error out only in case of a software bug in driver code,
not because of a runtime/hardware error. Hence, let's WARN_ON() in this
case and return 0 which is harmless anyway.

Fixes: 8878b126df76 ("mtd: nand: add ->exec_op() implementation")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/nand_base.c
include/linux/mtd/rawnand.h