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-24 11:41:01 +0800
commitefacff3850bf899cfe9c70b1a01c7c9f5eb01df0 (patch)
tree3368f85f49af55882bfd178b11bee7268042b789
parent7e1cece6187395ef8de9b9447471b28fec2c3eda (diff)
dm crypt: fix missing error code return from crypt_ctr error pathv3.14/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 5dbe7a20a87b..c701c9bc2bff 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1821,6 +1821,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) {