isdn/capi: return proper errnos on module init
PATCH 1/1 isdn/capi: return proper errnos on module init
cdebug_init is called from kcapi_init which is module initialization function, so it must return negative values on errors
---
compile tested only
--- drivers/isdn/capi/capiutil.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/isdn/capi/capiutil.c +3 -3
@@ -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 ;
Quoted 5 lines · Karsten Keil
cdebug_initis called fromkcapi_initwhich is module initialization function, so it must return negative values on errorsSigned-off-by Marcin Slusarz <[email protected]>Acked-by Karsten Keil <[email protected]>
Hi Karsten.
Lately David Miller has started to include isdn patches in his netdev tree. So I think you should pass then on to David and not Andrew.
David or Andrew will correct me if I'm wrong...
Sam
Quoted 37 lines
---
compile tested only--- drivers/isdn/capi/capiutil.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/isdn/capi/capiutil.c +3
-3@@ -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 ;Signature · 5 lines
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · On Sun, 11 May 2008 23:21:17 +0200 Sam Ravnborg <[email protected]> wrote:
Quoted 5 lines · Karsten Keil
cdebug_initis called fromkcapi_initwhich is module initialization function, so it must return negative values on errorsSigned-off-by Marcin Slusarz <[email protected]>Acked-by Karsten Keil <[email protected]>
Quoted 6 lines
Hi Karsten.
Lately David Miller has started to include isdn patches in his netdev tree. So I think you should pass then on to David and not Andrew.
David or Andrew will correct me if I'm wrong...
That's news to me, but I'm easy either way. Another set of eyes never hurts. Dave: your call, please.
From: Sam Ravnborg <[email protected]>
Date: Sun, 11 May 2008 23:21:17 +0200
Quoted 4 lines
Lately David Miller has started to include isdn patches in his netdev tree. So I think you should pass then on to David and not Andrew.
David or Andrew will correct me if I'm wrong...
Yes, I try to pick them up.