aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2015-04-16 22:00:50 -0400
committerAlex Shi <alex.shi@linaro.org>2015-06-29 11:57:47 +0800
commit5bc4b6f3cb518bb99b481592db234da9d34fe9ac (patch)
treefeff30c316fa6791a66581b0e3b1e04eadd1399d
parenta2c92743350cfbe88562bb9d153d8f62d994302e (diff)
downloadlinux-linaro-stable-v3.18/topic/dm-crypt.tar.gz
dm crypt: fix missing error code return from crypt_ctr error pathv3.18/topic/dm-crypt
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> (cherry picked from commit 44c144f9c8e8fbd73ede2848da8253b3aae42ec2) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--drivers/md/dm-crypt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index aa1238facbeb..5503e43e5f28 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1816,6 +1816,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
if (ret)
goto bad;
+ ret = -EINVAL;
while (opt_params--) {
opt_string = dm_shift_arg(&as);
if (!opt_string) {