aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorSascha Hauer <[email protected]>2021-02-05 15:27:25 +0100
committerMiquel Raynal <[email protected]>2021-03-11 09:37:29 +0100
commit8ffbec7df4d64446cb0479261524c490a2c7529e (patch)
tree857ce25e790211f295d1952861973f0c79cc999c /tools/perf/scripts/python/export-to-sqlite.py
parentec9e0203a3598d979d6151703e673c8cb186304d (diff)
mtd: nand: fix error handling in nand_prog_page_op() #2
On success nand_exec_prog_page_op() returns the NAND status byte, but on failure it returns a negative error code. nand_prog_page_op() interprets the return value as NAND status byte without error checking. This means a failure in nand_exec_prog_page_op() can go through unnoticed. The straight forward fix would be to add the missing error checking. To clean the code a bit we can move the nand status check to nand_prog_page_op(). This way we can get rid of the overloaded return value from nand_exec_prog_page_op() and return a plain error code which is less error prone. nand_exec_prog_page_op() is only called from one other place and in this call the 'prog' parameter is false in which case the nand status check is skipped, so it's correct to not add the NAND status check there. Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions