Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: backing-dev: Remove the unneeded result variable

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>

authored by

ye xingchen and committed by
Andrew Morton
3083da7b c4f20f14

+1 -5
+1 -5
mm/backing-dev.c
··· 776 776 777 777 int bdi_init(struct backing_dev_info *bdi) 778 778 { 779 - int ret; 780 - 781 779 bdi->dev = NULL; 782 780 783 781 kref_init(&bdi->refcnt); ··· 786 788 INIT_LIST_HEAD(&bdi->wb_list); 787 789 init_waitqueue_head(&bdi->wb_waitq); 788 790 789 - ret = cgwb_bdi_init(bdi); 790 - 791 - return ret; 791 + return cgwb_bdi_init(bdi); 792 792 } 793 793 794 794 struct backing_dev_info *bdi_alloc(int node_id)