brd: return 0/-error from brd_insert_page()
authorJens Axboe <axboe@kernel.dk>
Thu, 16 Feb 2023 14:57:32 +0000 (07:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:15 +0000 (09:34 +0100)
commitf832bd2ee4c457bbb4dc75575aba75c4b396ecd2
treeb33e5378db1f49cae3cd25272487c910b1f280e2
parent95bb37e077db59998d04d633099c366df26d379f
brd: return 0/-error from brd_insert_page()

commit db0ccc44a20b4bb3039c0f6885a1f9c3323c7673 upstream.

It currently returns a page, but callers just check for NULL/page to
gauge success. Clean this up and return the appropriate error directly
instead.

Cc: stable@vger.kernel.org # 5.10+
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/brd.c