All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@linuxtv.org>
To: akpm@linux-foundation.org
Cc: mchehab@infradead.org, linux-media@vger.kernel.org,
	randy.dunlap@oracle.com, pboettcher@dibcom.fr
Subject: Re: [patch 02/11] dib7000p: reduce large stack usage
Date: Wed, 28 Apr 2010 00:05:12 +0200	[thread overview]
Message-ID: <4BD75F98.9000804@linuxtv.org> (raw)
In-Reply-To: <201004272111.o3RLBKix019982@imap1.linux-foundation.org>

akpm@linux-foundation.org wrote:
> diff -puN drivers/media/dvb/frontends/dib7000p.c~dib7000p-reduce-large-stack-usage drivers/media/dvb/frontends/dib7000p.c
> --- a/drivers/media/dvb/frontends/dib7000p.c~dib7000p-reduce-large-stack-usage
> +++ a/drivers/media/dvb/frontends/dib7000p.c
> @@ -1324,46 +1324,54 @@ EXPORT_SYMBOL(dib7000p_pid_filter);
>  
>  int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000p_config cfg[])
>  {
> -	struct dib7000p_state st = { .i2c_adap = i2c };
> +	struct dib7000p_state *dpst;
>  	int k = 0;
>  	u8 new_addr = 0;
>  
> +	dpst = kzalloc(sizeof(struct dib7000p_state), GFP_KERNEL);
> +	if (!dpst)
> +		return -ENODEV;

I think ENOMEM would be appropriate here.

The same applies to patch 01/11.

Regards,
Andreas

      reply	other threads:[~2010-04-27 22:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 21:11 [patch 02/11] dib7000p: reduce large stack usage akpm
2010-04-27 22:05 ` Andreas Oberritter [this message]

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=4BD75F98.9000804@linuxtv.org \
    --to=obi@linuxtv.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=pboettcher@dibcom.fr \
    --cc=randy.dunlap@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.