From cb02dc0872195e79cf61616e29d3aefc8b0e664f Mon Sep 17 00:00:00 2001
From: Pablo Galindo Salgado <Pablogsal@gmail.com>
Date: Thu, 4 Aug 2022 22:44:06 +0100
Subject: [PATCH] [3.11] gh-92678: Correct return values for errors in
 PyInit__testcapi (#95664)

---
 Modules/_testcapimodule.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 961616dae63..8087b444939 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -7824,7 +7824,7 @@ PyInit__testcapi(void)
 
     PyObject *HeapCTypeWithDict2 = PyType_FromSpec(&HeapCTypeWithDict2_spec);
     if (HeapCTypeWithDict2 == NULL) {
-        return -1;
+        return NULL;
     }
     PyModule_AddObject(m, "HeapCTypeWithDict2", HeapCTypeWithDict2);
 
@@ -7848,7 +7848,7 @@ PyInit__testcapi(void)
 
     PyObject *HeapCTypeWithWeakref2 = PyType_FromSpec(&HeapCTypeWithWeakref2_spec);
     if (HeapCTypeWithWeakref2 == NULL) {
-        return -1;
+        return NULL;
     }
     PyModule_AddObject(m, "HeapCTypeWithWeakref2", HeapCTypeWithWeakref2);
 
-- 
GitLab