target: Clean up returning errors in PR handling code
authorRoland Dreier <roland@purestorage.com>
Mon, 16 Jul 2012 22:17:10 +0000 (15:17 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 25 Jul 2012 03:11:25 +0000 (04:11 +0100)
commit6154c5bc1f1c0e02dd41bd96300c63e137bdee51
treefc8b37beb3517e199ffc050bd3675e0277bc9e09
parent9729de799b03fd6141e1b248f063575a531f8f00
target: Clean up returning errors in PR handling code

commit d35212f3ca3bf4fb49d15e37f530c9931e2d2183 upstream.

 - instead of (PTR_ERR(file) < 0) just use IS_ERR(file)
 - return -EINVAL instead of EINVAL
 - all other error returns in target_scsi3_emulate_pr_out() use
   "goto out" -- get rid of the one remaining straight "return."

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/target/target_core_pr.c