]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: tests: return -EIO when mtdtest_read() failed to read requested bytes
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 15 Aug 2013 13:55:07 +0000 (22:55 +0900)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 16 Aug 2013 13:41:30 +0000 (16:41 +0300)
commitd9013e7109e04368dad4df4ce16f709c35600723
treee46f47f0d198aa1307113483f47e6e3c25406865
parent6aef1fee6e857e88e97fee4f4e1470fb8c23d9f9
mtd: tests: return -EIO when mtdtest_read() failed to read requested bytes

mtdtest_read() returns -EINVAL if the number of bytes actually read
is smaller than the number of bytes requested.  But mtdtest_write()
returns -EIO in the similar error condition and returning -EIO seems
more appropriate than -EINVAL in this case.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/tests/mtd_test.c