From: Wei Yongjun Date: Fri, 17 Apr 2015 02:00:50 +0000 (-0400) Subject: dm crypt: fix missing error code return from crypt_ctr error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=44c144f9c8e8fbd73ede2848da8253b3aae42ec2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 9b5e1eb0ffcf..9eeea196328a 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) {