Skip to content

Commit b97b3da

Browse files
use ENOMEM instead of MEMORY_E with aes glue returns f-669
1 parent 1958fbd commit b97b3da

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

linuxkm/lkcapi_aes_glue.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ static int km_AesInitCommon(
296296
if (! ctx->aes_encrypt) {
297297
pr_err("%s: allocation of %zu bytes for encryption key failed.\n",
298298
name, sizeof(*ctx->aes_encrypt));
299-
err = -MEMORY_E;
299+
err = -ENOMEM;
300300
goto out;
301301
}
302302

@@ -319,7 +319,7 @@ static int km_AesInitCommon(
319319
if (! ctx->aes_decrypt) {
320320
pr_err("%s: allocation of %zu bytes for decryption key failed.\n",
321321
name, sizeof(*ctx->aes_decrypt));
322-
err = -MEMORY_E;
322+
err = -ENOMEM;
323323
goto out;
324324
}
325325

@@ -341,7 +341,7 @@ static int km_AesInitCommon(
341341
if (! ctx->aes_encrypt_C) {
342342
pr_err("%s: allocation of %zu bytes for encryption key failed.\n",
343343
name, sizeof(*ctx->aes_encrypt_C));
344-
err = -MEMORY_E;
344+
err = -ENOMEM;
345345
goto out;
346346
}
347347

@@ -1577,7 +1577,7 @@ static int km_AesXtsInitCommon(struct km_AesXtsCtx * ctx, const char * name)
15771577
ctx->aesXts = (XtsAes *)malloc(sizeof(*ctx->aesXts));
15781578

15791579
if (! ctx->aesXts)
1580-
return -MEMORY_E;
1580+
return -ENOMEM;
15811581

15821582
err = wc_AesXtsInit(ctx->aesXts, NULL, INVALID_DEVID);
15831583

0 commit comments

Comments
 (0)