]> www.infradead.org Git - users/hch/misc.git/commit
block/blk-iocost: ensure 'ret' is set on error
authorJens Axboe <axboe@kernel.dk>
Wed, 19 Mar 2025 20:36:33 +0000 (14:36 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Mar 2025 20:51:36 +0000 (14:51 -0600)
commit03c90afb21b45edb87533fa6f11c5f914d26298b
treeb34731e8a97947cbfd4322be785e73eee408a69f
parent9730763f4756e32520cb86778331465e8d063a8f
block/blk-iocost: ensure 'ret' is set on error

In case blkg_conf_open_bdev_frozen() fails, ioc_qos_write() jumps to the
error path without assigning a value to 'ret'. Ensure that it inherits
the error from the passed back error value.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503200454.QWpwKeJu-lkp@intel.com/
Fixes: 9730763f4756 ("block: correct locking order for protecting blk-wbt parameters")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-iocost.c