fix F-1426: PTR_ERR on malloc Results Always Yields 0 in AES-GCM Self-Test Error Messages

This commit is contained in:
Daniel Pouzzner
2026-06-11 18:17:07 -05:00
parent 8c1013ad52
commit b3cb06e98a
+2 -4
View File
@@ -3616,16 +3616,14 @@ static int linuxkm_test_aesgcm(void)
src = malloc(sizeof(struct scatterlist) * 2);
if (! src) {
pr_err("error: malloc src failed: %ld\n",
PTR_ERR(src));
pr_err("error: malloc src failed,\n");
goto test_gcm_end;
}
dst = malloc(sizeof(struct scatterlist) * 2);
if (! dst) {
pr_err("error: malloc dst failed: %ld\n",
PTR_ERR(dst));
pr_err("error: malloc dst failed.\n");
goto test_gcm_end;
}