summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asymmetric_keys/asymmetric_type.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c
index f0f2111d2c66..29983cbb658d 100644
--- a/crypto/asymmetric_keys/asymmetric_type.c
+++ b/crypto/asymmetric_keys/asymmetric_type.c
@@ -153,8 +153,8 @@ static int asymmetric_key_match_preparse(struct key_match_data *match_data)
}
match_id = asymmetric_key_hex_to_key_id(id);
- if (!match_id)
- return -ENOMEM;
+ if (IS_ERR(match_id))
+ return PTR_ERR(match_id);
match_data->preparsed = match_id;
match_data->cmp = asymmetric_key_cmp;