Skip to content

Commit

Permalink
mm: backing-dev: Remove the unneeded result variable
Browse files Browse the repository at this point in the history
Return the value cgwb_bdi_init() directly instead of storing it in another
redundant variable.

Link: https://lkml.kernel.org/r/20220826071906.252419-1-ye.xingchen@zte.com.cn
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Reported-by: Zeal Robot <zealci@zte.com.cn>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
ye xingchen authored and Andrew Morton committed Sep 12, 2022
1 parent c4f20f1 commit 3083da7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mm/backing-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,6 @@ static void cgwb_remove_from_bdi_list(struct bdi_writeback *wb)

int bdi_init(struct backing_dev_info *bdi)
{
int ret;

bdi->dev = NULL;

kref_init(&bdi->refcnt);
Expand All @@ -788,9 +786,7 @@ int bdi_init(struct backing_dev_info *bdi)
INIT_LIST_HEAD(&bdi->wb_list);
init_waitqueue_head(&bdi->wb_waitq);

ret = cgwb_bdi_init(bdi);

return ret;
return cgwb_bdi_init(bdi);
}

struct backing_dev_info *bdi_alloc(int node_id)
Expand Down

0 comments on commit 3083da7

Please sign in to comment.