block: drop device references in bsg_queue_rq() for-5.4/post for-5.4/post-2019-09-24
authorMartin Wilck <mwilck@suse.com>
Mon, 23 Sep 2019 14:02:02 +0000 (14:02 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 23 Sep 2019 17:17:24 +0000 (11:17 -0600)
commitd46fe2cb2dce7f5038473b5859e03f5e16b7428e
tree408e14effb0c002d652c057826fd0f0f1c25805e
parentbe21683e48f26032199504fb60b9a27eeff05fc3
block: drop device references in bsg_queue_rq()

Make sure that bsg_queue_rq() calls put_device() if an error is
encountered after get_device() was successful.

Fixes: cd2f076f1d7a ("bsg: convert to use blk-mq")
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bsg-lib.c