From be4475d404c7bba99de1beff4c3bb2c5d2094279 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Fri, 9 Jul 2010 12:09:22 +0200 Subject: Represent ENOKEY as a negative value Signed-off-by: Nikos Mavrogiannopoulos --- ncr-key-wrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ncr-key-wrap.c b/ncr-key-wrap.c index 41a7aea..f9c019d 100644 --- a/ncr-key-wrap.c +++ b/ncr-key-wrap.c @@ -559,7 +559,7 @@ int ret; if (master_key.type != NCR_KEY_TYPE_SECRET) { err(); - return ENOKEY; + return -ENOKEY; } if (unlikely(copy_from_user(&wrap, arg, sizeof(wrap)))) { @@ -618,7 +618,7 @@ int ret; if (master_key.type != NCR_KEY_TYPE_SECRET) { err(); - return ENOKEY; + return -ENOKEY; } if (unlikely(copy_from_user(&wrap, arg, sizeof(wrap)))) { -- cgit