netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 8/8] isdn/capi: return proper errnos on module init
@ 2008-05-14 23:19 akpm
  2008-05-14 23:42 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2008-05-14 23:19 UTC (permalink / raw)
  To: davem; +Cc: netdev, akpm, marcin.slusarz, kkeil

From: Marcin Slusarz <marcin.slusarz@gmail.com>

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

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/isdn/capi/capiutil.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -puN drivers/isdn/capi/capiutil.c~isdn-capi-return-proper-errnos-on-module-init drivers/isdn/capi/capiutil.c
--- a/drivers/isdn/capi/capiutil.c~isdn-capi-return-proper-errnos-on-module-init
+++ a/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;
_

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-14 23:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-14 23:19 [patch 8/8] isdn/capi: return proper errnos on module init akpm
2008-05-14 23:42 ` David Miller
2008-05-14 23:49   ` Andrew Morton
2008-05-14 23:55     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).