Skip to contentSkip to conversation

isdn/capi: return proper errnos on module init

PATCH In review [email protected] 2 participants 4 messages May 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 8/8 isdn/capi: return proper errnos on module init

From: Marcin Slusarz <[email protected]>

cdebug_init() is called from kcapi_init() which is module initialization function, so it must return negative values on errors.

---

 drivers/isdn/capi/capiutil.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/isdn/capi/capiutil.c renamed from drivers/isdn/capi/capiutil.c~isdn-capi-return-proper-errnos-on-module-init +3 -3
diff -puN drivers/isdn/capi/capiutil.c~isdn-capi-return-proper-errnos-on-module-init drivers/isdn/capi/capiutil.c
@@ -948,17 +948,17 @@ int __init cdebug_init(void)
 {
 	g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL);
 	if (!g_cmsg)
-		return ENOMEM;
+		return -ENOMEM;
 	g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL);
 	if (!g_debbuf) {
 		kfree(g_cmsg);
-		return ENOMEM;
+		return -ENOMEM;
 	}
 	g_debbuf->buf = kmalloc(CDEBUG_GSIZE, GFP_KERNEL);
 	if (!g_debbuf->buf) {
 		kfree(g_cmsg);
 		kfree(g_debbuf);
-		return ENOMEM;;
+		return -ENOMEM;;
 	}
 	g_debbuf->size = CDEBUG_GSIZE;
 	g_debbuf->buf[0] = 0;

_

maintainer Acked-by on v1 8/8
#1 lore raw

From: [email protected]
Date: Wed, 14 May 2008 16:19:46 -0700

Quoted 8 lines

From: Marcin Slusarz <[email protected]>

cdebug_init() is called from kcapi_init() which is module initialization function, so it must return negative values on errors.

#2 lore raw
Quoted 5 lines · On Wed, 14 May 2008 16:42:23 -0700 (PDT) David Miller <[email protected]>…

From: [email protected]
Date: Wed, 14 May 2008 16:19:46 -0700

Quoted 2 lines

From: Marcin Slusarz <[email protected]>

Quoted 8 lines
Quoted 6 lines

cdebug_init() is called from kcapi_init() which is module initialization function, so it must return negative values on errors.

hm, what does this mean? I was hoping for "applied, thanks" ;)

maintainer
#3 lore raw

From: Andrew Morton <[email protected]>
Date: Wed, 14 May 2008 16:49:31 -0700

Quoted 11 lines
Quoted 8 lines · On Wed, 14 May 2008 16:42:23 -0700 (PDT) David Miller <[email protected]>…

From: [email protected]
Date: Wed, 14 May 2008 16:19:46 -0700

Quoted 5 lines

From: Marcin Slusarz <[email protected]>

cdebug_init() is called from kcapi_init() which is module initialization function, so it must return negative values on errors.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

hm, what does this mean? I was hoping for "applied, thanks" ;)

Sorry, I thought you were dumping to Linus, I didn't read the to:/cc: