blk-cgroup: Return -ENOMEM directly in blkcg_css_alloc() error path
authorWaiman Long <longman@redhat.com>
Sat, 5 Nov 2022 00:59:00 +0000 (20:59 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Nov 2022 23:58:44 +0000 (16:58 -0700)
commitb5a9adcbd5dc95d34d1f5fc84eff9af6fc60d284
treeebd636e9f4c07223f794d6e4d9bcce883470014b
parent077a4033541fc96fb0a955985aab7d1f353da831
blk-cgroup: Return -ENOMEM directly in blkcg_css_alloc() error path

For blkcg_css_alloc(), the only error that will be returned is -ENOMEM.
Simplify error handling code by returning this error directly instead
of setting an intermediate "ret" variable.

Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20221105005902.407297-2-longman@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c