block: Fix off-by-one errors in blk_status_to_errno() and print_req_error()
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 21 Jun 2017 17:55:46 +0000 (10:55 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Jun 2017 18:01:14 +0000 (12:01 -0600)
commit34bd9c1c4f62e936d8865e6442f332cd85bdfc95
treedf1aefcbcb80242e1c892866dd3ad1c727d88cf5
parente0fc443a8643d4c9b330a637a1e6a422a44dde2a
block: Fix off-by-one errors in blk_status_to_errno() and print_req_error()

This was detected by the smatch static analyzer.

Fixes: commit 2a842acab109 ("block: introduce new block status code type")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c