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>
(cherry picked from commit 44c144f9c8e8fbd73ede2848da8253b3aae42ec2)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index aa1238f..5503e43 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1816,6 +1816,7 @@
if (ret)
goto bad;
+ ret = -EINVAL;
while (opt_params--) {
opt_string = dm_shift_arg(&as);
if (!opt_string) {