Fix error return values for incorrect r/w direction
commit9d0e4722c1eaae0dbf593713029d1aab7ce11597
authorTejun Heo <tj@kernel.org>
Wed, 17 Feb 2010 09:23:00 +0000 (17 18:23 +0900)
committerTejun Heo <tj@kernel.org>
Wed, 17 Feb 2010 09:23:00 +0000 (17 18:23 +0900)
tree1f6b9061345534065886b0a9dc2e675ac39853fa
parent05e0e9b06b1a0658f93a2fa0cf612b4ffcf44f5b
Fix error return values for incorrect r/w direction

r/w and GETI/OSPACE should fail with -EINVAL not -EIO if r/w direction
is wrong.  Make osspd remember the rw direction, check it and fail
with -EINVAL before passing the command onto the slave.  This bug was
discovered by Maarten and tested in osstest.
osspd.c