scsi: simplify scsi_prep_state_check
authorChristoph Hellwig <hch@lst.de>
Fri, 9 Nov 2018 13:42:36 +0000 (14:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 10 Nov 2018 02:17:13 +0000 (19:17 -0700)
commitc092d4ec53c9c7e690ad517b414078db4da6870b
tree0257c6293612f2292661b3b3382f53fb13267a3f
parent535ac5d3fe63b9ea1dda379f606f9d0d377d7184
scsi: simplify scsi_prep_state_check

Return a blk_status_t directly, and make the code a little more compact
by handling the fast path in the caller.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_lib.c