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:40:02 +0000 (09:40 +0100)
commitcb104b880d789bb50efa37d973e409aeab82262c
tree24f3c81f002431ab48f1899ce6dc6cb920bc96a6
parent113d4b0e12f49862e3b2cabc741d9d5aa949e3c1
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