From: Liu Xiang Date: Fri, 25 Jan 2019 14:01:36 +0000 (+0800) Subject: ext2: Remove redundant check for finding no group X-Git-Tag: v5.1-rc1~140^2~7 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=0b7a814c26444ec71c5a37a4a60ea180d8e8c6e8;p=linux.git ext2: Remove redundant check for finding no group When best_desc keeps NULL, best_group keeps -1, too. So we can return best_group directly. Signed-off-by: Liu Xiang Signed-off-by: Jan Kara --- diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index 5c3d7b7e4975..a0c5ea91fcd4 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c @@ -222,8 +222,6 @@ static int find_group_dir(struct super_block *sb, struct inode *parent) best_desc = desc; } } - if (!best_desc) - return -1; return best_group; }