It is better to propagate PTR_ERR value instead of a hardcoded value(-ENOMEM here). Signed-off-by: Zhang Shengju <zhangshengju@xxxxxxxxxxxxxxxxxxxx> --- crypto/842.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/842.c b/crypto/842.c index bc26dc9..6d4f7c7 100644 --- a/crypto/842.c +++ b/crypto/842.c @@ -54,7 +54,7 @@ static int crypto842_init(struct crypto_tfm *tfm) ctx->wmem = crypto842_alloc_ctx(NULL); if (IS_ERR(ctx->wmem)) - return -ENOMEM; + return PTR_ERR(ctx-wmem); return 0; } -- 1.8.3.1