]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: null_alloc_page() cleanup
authorChaitanya Kulkarni <kch@nvidia.com>
Tue, 22 Feb 2022 15:28:52 +0000 (07:28 -0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 27 Feb 2022 21:49:49 +0000 (14:49 -0700)
commitc45158667cc3844ac0493696b336541cf1210794
tree0955411e6d67f2e2f8b4bc25fed0dfa102e0d29c
parent2061ef99fb12e55a3af79235ed697e3a61d5860f
null_blk: null_alloc_page() cleanup

Remove goto labels and use direct returns as error unwinding code only
needs to free t_page variable if we alloc_pages() call fails as having
two labels for one kfree() can be avoided easily.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220222152852.26043-3-kch@nvidia.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk/main.c