summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2015-04-16 22:00:50 -0400
committerMike Snitzer <snitzer@redhat.com>2015-04-16 22:00:50 -0400
commit44c144f9c8e8fbd73ede2848da8253b3aae42ec2 (patch)
tree44976eadfb47c88c666ba3622ef0045d3a30bdce
parent0618764cb25f6fa9fb31152995de42a8a0496475 (diff)
downloadop-kernel-dev-44c144f9c8e8fbd73ede2848da8253b3aae42ec2.zip
op-kernel-dev-44c144f9c8e8fbd73ede2848da8253b3aae42ec2.tar.gz
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>
-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 9b5e1eb..9eeea19 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) {
OpenPOWER on IntegriCloud