From patchwork Wed Mar 5 10:55:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 3773231 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AE9EF9F1EE for ; Wed, 5 Mar 2014 11:28:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED51C20256 for ; Wed, 5 Mar 2014 11:28:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C905B20251 for ; Wed, 5 Mar 2014 11:28:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 05F7F265936; Wed, 5 Mar 2014 12:28:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id C1B0626592B; Wed, 5 Mar 2014 12:15:30 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C870526592B; Wed, 5 Mar 2014 12:15:29 +0100 (CET) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) by alsa0.perex.cz (Postfix) with ESMTP id 7D3FB265953 for ; Wed, 5 Mar 2014 11:57:39 +0100 (CET) Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s25AvXlv005777 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Mar 2014 10:57:34 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s25AvVrf006031 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Mar 2014 10:57:32 GMT Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s25AvVre007195; Wed, 5 Mar 2014 10:57:31 GMT Received: from elgon.mountain (/41.202.233.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Mar 2014 02:57:30 -0800 Date: Wed, 5 Mar 2014 13:55:09 +0300 From: Dan Carpenter To: Jaroslav Kysela Message-ID: <20140305105225.GA3599@elgon.mountain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Cc: Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org Subject: [alsa-devel] [patch] ALSA: lola: NULL deref on allocation error X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP "chip" is NULL here. We don't need a printk here because kmalloc() has it built in. Signed-off-by: Dan Carpenter diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c index d63434d8c3fb..68824cdd137d 100644 --- a/sound/pci/lola/lola.c +++ b/sound/pci/lola/lola.c @@ -586,7 +586,6 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci, chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (!chip) { - dev_err(chip->card->dev, "cannot allocate chip\n"); pci_disable_device(pci); return -ENOMEM; }