From patchwork Fri May 9 11:55:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 4141821 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1CEE2BFF02 for ; Fri, 9 May 2014 11:56:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 302A8201DD for ; Fri, 9 May 2014 11:56:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 452CC201DC for ; Fri, 9 May 2014 11:56:27 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E85802655AB; Fri, 9 May 2014 13:56:24 +0200 (CEST) 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 C9415261A40; Fri, 9 May 2014 13:56:16 +0200 (CEST) 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 B63EA261A53; Fri, 9 May 2014 13:56:14 +0200 (CEST) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by alsa0.perex.cz (Postfix) with ESMTP id 71B482617AD for ; Fri, 9 May 2014 13:56:06 +0200 (CEST) Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s49Bu19c010483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 9 May 2014 11:56:02 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s49BtpQt012822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 May 2014 11:55:52 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s49BtpY6012815; Fri, 9 May 2014 11:55:51 GMT Received: from mwanda (/197.157.0.6) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 09 May 2014 04:55:51 -0700 Date: Fri, 9 May 2014 14:55:38 +0300 From: Dan Carpenter To: Liam Girdwood Message-ID: <20140509115538.GB32027@mwanda> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet22.oracle.com [141.146.126.238] Cc: Dimitris Papastamos , alsa-devel@alsa-project.org, Takashi Iwai , patches@opensource.wolfsonmicro.com, kernel-janitors@vger.kernel.org, Wei Yongjun , Mark Brown , Charles Keepax Subject: [alsa-devel] [patch] ASoC: wm0010: set error code on allocation failure 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 We should return -ENOMEM if the kzalloc() fails instead of returning -ENOMEM. Signed-off-by: Dan Carpenter diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index 71ce315..8dac6c5 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -682,6 +682,7 @@ static int wm0010_boot(struct snd_soc_codec *codec) if (!img_swap) { dev_err(codec->dev, "Failed to allocate image buffer\n"); + ret = -ENOMEM; goto abort; }