nbd: share nbd_put and return by goto put_nbd
authorSun Ke <sunke32@huawei.com>
Wed, 12 May 2021 11:43:31 +0000 (19:43 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 12 May 2021 14:42:43 +0000 (08:42 -0600)
commitbedf78c4cbbbb65e42ede5ca2bd21887ef5b7060
tree684d227ab72a6f78014eb2c2415351dc82c9275f
parent79ebe9110fa458d58f1fceb078e2068d7ad37390
nbd: share nbd_put and return by goto put_nbd

Replace the following two statements by the statement “goto put_nbd;”

nbd_put(nbd);
return 0;

Signed-off-by: Sun Ke <sunke32@huawei.com>
Suggested-by: Markus Elfring <Markus.Elfring@web.de>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/r/20210512114331.1233964-3-sunke32@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c