* [PATCH] dm crypt: fix error return code in crypt_ctr()
@ 2015-04-16 12:21 weiyj_lk
0 siblings, 0 replies; only message in thread
From: weiyj_lk @ 2015-04-16 12:21 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer, Neil Brown
Cc: Wei Yongjun, dm-devel, linux-raid
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/md/dm-crypt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 713a962..8154f58 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) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-16 12:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 12:21 [PATCH] dm crypt: fix error return code in crypt_ctr() weiyj_lk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).