瀏覽代碼

UBIFS: fix remount error path

Dan's "smatch" checker found out that there was a bug in the error path of the
'ubifs_remount_rw()' function. Instead of jumping to the "out" label which
cleans-things up, we just returned.

This patch fixes the problem.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Artem Bityutskiy 11 年之前
父節點
當前提交
fcdd57c890
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/ubifs/super.c

+ 1 - 1
fs/ubifs/super.c

@@ -1556,7 +1556,7 @@ static int ubifs_remount_rw(struct ubifs_info *c)
 	if (c->space_fixup) {
 	if (c->space_fixup) {
 		err = ubifs_fixup_free_space(c);
 		err = ubifs_fixup_free_space(c);
 		if (err)
 		if (err)
-			return err;
+			goto out;
 	}
 	}
 
 
 	err = check_free_space(c);
 	err = check_free_space(c);