From patchwork Tue Feb 2 14:29:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 76382 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o12EO5BW030296 for ; Tue, 2 Feb 2010 14:24:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756157Ab0BBOXh (ORCPT ); Tue, 2 Feb 2010 09:23:37 -0500 Received: from ey-out-2122.google.com ([74.125.78.27]:43679 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756052Ab0BBOXf (ORCPT ); Tue, 2 Feb 2010 09:23:35 -0500 Received: by ey-out-2122.google.com with SMTP id d26so31663eyd.19 for ; Tue, 02 Feb 2010 06:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=1kpEU3FunS0AaYsFALddhrLMflQT7vO2y6hIld9vs0w=; b=cnJmUo/E/Ngf9PnCe0Dyfor8qDaSN9sPacPzMj7BtRPOafkDeJpxWlPrLs06G6omNU MW6/ufvgO/ySjS7N1z2hvwEWAyAGyyMeRyVGgU3YK/o+jb6XETzDLmUoYwt7roHqOW9q m+OzWRwpdQdwm9LEQ15ITtUOUWXP+Qf28iVaM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=ky/yzY75qOq5Si7dj1WI8Qu/StMfVGAbCra4JvMLTtW5wtVyt8sRZquzTExig3YnrW p7hVr+XNh+q/nWyJzPbf3/APLZQTYtcc8Tb7AU7bG48wmfWG/5YKa+bkngVmMHiMFHMS KbHYn36vbZkg9xvBmpc41RKEa2XL/fZu3C7Js= Received: by 10.213.100.208 with SMTP id z16mr805571ebn.80.1265120614416; Tue, 02 Feb 2010 06:23:34 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 10sm13006537eyz.7.2010.02.02.06.23.33 (version=SSLv3 cipher=RC4-MD5); Tue, 02 Feb 2010 06:23:33 -0800 (PST) Message-ID: <4B6836DA.8030907@gmail.com> Date: Tue, 02 Feb 2010 15:29:46 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1 MIME-Version: 1.0 To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, Andrew Morton , LKML Subject: [PATCH] dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init() Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 02 Feb 2010 14:24:05 +0000 (UTC) diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c index e331db8..5d91f70 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c @@ -243,7 +243,7 @@ int dvb_usb_device_init(struct usb_interface *intf, d = kzalloc(sizeof(struct dvb_usb_device),GFP_KERNEL); if (d == NULL) { err("no memory for 'struct dvb_usb_device'"); - return ret; + return -ENOMEM; } d->udev = udev;