浏览代码

dm crypt: fix missing error code return from crypt_ctr error path

Fix to return a negative error code from crypt_ctr()'s optional
parameter processing error path.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Wei Yongjun 10 年之前
父节点
当前提交
44c144f9c8
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/md/dm-crypt.c

+ 1 - 0
drivers/md/dm-crypt.c

@@ -1816,6 +1816,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
 		if (ret)
 		if (ret)
 			goto bad;
 			goto bad;
 
 
+		ret = -EINVAL;
 		while (opt_params--) {
 		while (opt_params--) {
 			opt_string = dm_shift_arg(&as);
 			opt_string = dm_shift_arg(&as);
 			if (!opt_string) {
 			if (!opt_string) {