mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Vikram Narayanan <vikram186@gmail.com>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] checks for return value during the initcall
Date: Mon, 18 Jul 2011 23:00:27 +0530	[thread overview]
Message-ID: <CAHwEkO1N2ESbo294moLofBt2ezrxTg+wMH4-zoTQ7oxXYD+FEA@mail.gmail.com> (raw)
In-Reply-To: <20110718044640.GJ20678@game.jcrosoft.org>

On Mon, Jul 18, 2011 at 10:16 AM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
>
> On 13:32 Sat 16 Jul     , Vikram Narayanan wrote:
> > Hi,
> >
> > This patch checks for the return value, if there is no memory allocated in the getc_buffer_flush initcall.
> >
> > Signed-off-by: Vikram Narayanan<vikram186@gmail.com>
> > ---
> > diff --git a/common/console.c b/common/console.c
> > index d60e57f..c502638 100644
> > --- a/common/console.c
> > +++ b/common/console.c
> > @@ -37,6 +37,7 @@
> >  #include <poller.h>
> >  #include <linux/list.h>
> >  #include <linux/stringify.h>
> > +#include <errno.h>
> >
> >  LIST_HEAD(console_list);
> >  EXPORT_SYMBOL(console_list);
> > @@ -118,6 +119,8 @@ static int getc_buffer_flush(void)
> >  {
> >       console_input_buffer = kfifo_alloc(1024);
> >       console_output_buffer = kfifo_alloc(1024);
> > +     if(!console_input_buffer || !console_output_buffer)
> > +             return ENOMEM;
> return -ENOMEM;
>
> and a DEBUG_LL message is important here for debug
Sure. That would be good. Shall I wait for the PUTS_LL to be added to the git?

-
Thanks,
Vikram
> Best Regards,
> J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-07-18 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-16  8:02 Vikram Narayanan
2011-07-18  4:46 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 17:30   ` Vikram Narayanan [this message]
2011-08-07 11:17   ` Vikram Narayanan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHwEkO1N2ESbo294moLofBt2ezrxTg+wMH4-zoTQ7oxXYD+FEA@mail.gmail.com \
    --to=vikram186@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox