Linux Media Controller development
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-media@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init()
Date: Tue, 2 Feb 2010 15:29:36 +0100	[thread overview]
Message-ID: <201002021529.36727.oliver@neukum.org> (raw)
In-Reply-To: <4B6836DA.8030907@gmail.com>

Am Dienstag, 2. Februar 2010 15:29:46 schrieb Roel Kluin:
> If in a cold state and the download succeeded ret is zero, but we
> should return -ENOMEM.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> Or shouldn't we?

We should and we do if cold==0.
The bug is caused by this:

	if (cold) {
		info("found a '%s' in cold state, will try to load a firmware",desc->name);
		ret = dvb_usb_download_firmware(udev,props);
		if (!props->no_reconnect || ret != 0)
			return ret;
	}

which overwrites ret

	Regards
		Oliver

  reply	other threads:[~2010-02-02 14:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 14:29 [PATCH] dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init() Roel Kluin
2010-02-02 14:29 ` Oliver Neukum [this message]
2010-02-03 16:02   ` roel kluin
2010-02-03 16:16     ` Oliver Neukum

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=201002021529.36727.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=roel.kluin@gmail.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