public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] isdn/capi: return proper errnos on module init
@ 2008-05-11 20:02 Marcin Slusarz
  0 siblings, 0 replies; 5+ messages in thread
From: Marcin Slusarz @ 2008-05-11 20:02 UTC (permalink / raw)
  To: LKML; +Cc: Karsten Keil

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>
Cc: Karsten Keil <kkeil@suse.de>
---
compile tested only
---
 drivers/isdn/capi/capiutil.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
--- a/drivers/isdn/capi/capiutil.c
+++ b/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] 5+ messages in thread

* [PATCH] isdn/capi: return proper errnos on module init
@ 2008-05-11 21:07 Karsten Keil
  2008-05-11 21:21 ` Sam Ravnborg
  0 siblings, 1 reply; 5+ messages in thread
From: Karsten Keil @ 2008-05-11 21:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Marcin Slusarz, LKML

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>
---
compile tested only
---
 drivers/isdn/capi/capiutil.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
--- a/drivers/isdn/capi/capiutil.c
+++ b/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] 5+ messages in thread

* Re: [PATCH] isdn/capi: return proper errnos on module init
  2008-05-11 21:07 [PATCH] isdn/capi: return proper errnos on module init Karsten Keil
@ 2008-05-11 21:21 ` Sam Ravnborg
  2008-05-11 21:27   ` Andrew Morton
  2008-05-11 22:14   ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-05-11 21:21 UTC (permalink / raw)
  To: Andrew Morton, Marcin Slusarz, LKML, David Miller

On Sun, May 11, 2008 at 11:07:07PM +0200, Karsten Keil wrote:
> 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>

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

> ---
> compile tested only
> ---
>  drivers/isdn/capi/capiutil.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
> --- a/drivers/isdn/capi/capiutil.c
> +++ b/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;
> -- 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH] isdn/capi: return proper errnos on module init
  2008-05-11 21:21 ` Sam Ravnborg
@ 2008-05-11 21:27   ` Andrew Morton
  2008-05-11 22:14   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2008-05-11 21:27 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Marcin Slusarz, LKML, David Miller

On Sun, 11 May 2008 23:21:17 +0200 Sam Ravnborg <sam@ravnborg.org> wrote:

> On Sun, May 11, 2008 at 11:07:07PM +0200, Karsten Keil wrote:
> > 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>
> 
> 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.


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

* Re: [PATCH] isdn/capi: return proper errnos on module init
  2008-05-11 21:21 ` Sam Ravnborg
  2008-05-11 21:27   ` Andrew Morton
@ 2008-05-11 22:14   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2008-05-11 22:14 UTC (permalink / raw)
  To: sam; +Cc: akpm, marcin.slusarz, linux-kernel

From: Sam Ravnborg <sam@ravnborg.org>
Date: Sun, 11 May 2008 23:21:17 +0200

> 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.

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

end of thread, other threads:[~2008-05-11 22:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-11 21:07 [PATCH] isdn/capi: return proper errnos on module init Karsten Keil
2008-05-11 21:21 ` Sam Ravnborg
2008-05-11 21:27   ` Andrew Morton
2008-05-11 22:14   ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2008-05-11 20:02 Marcin Slusarz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox