From patchwork Tue Feb 11 19:26:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 3629701 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 02D309F2D6 for ; Tue, 11 Feb 2014 19:27:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D48B201FE for ; Tue, 11 Feb 2014 19:27:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6251F2020A for ; Tue, 11 Feb 2014 19:27:40 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 497842607BB; Tue, 11 Feb 2014 20:27:38 +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 3D2BB26084D; Tue, 11 Feb 2014 20:27:33 +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 CD8A2260863; Tue, 11 Feb 2014 20:27:32 +0100 (CET) Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id 93DDD2607BB for ; Tue, 11 Feb 2014 20:27:25 +0100 (CET) Received: from cpc11-sgyl31-2-0-cust68.sgyl.cable.virginm.net ([94.175.92.69] helo=debutante.sirena.org.uk) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WDIzG-0007X8-0Q; Tue, 11 Feb 2014 19:27:19 +0000 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.82) (envelope-from ) id 1WDIzB-00051P-OO; Tue, 11 Feb 2014 19:27:13 +0000 From: Mark Brown To: Brian Austin , Paul Handrigan , Liam Girdwood Date: Tue, 11 Feb 2014 19:26:47 +0000 Message-Id: <1392146808-19269-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 1.9.0.rc3 X-SA-Exim-Connect-IP: 94.175.92.69 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org, Mark Brown Subject: [alsa-devel] [PATCH 1/2] ASoC: cs42l51: Don't log if we fail to allocate memory 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mark Brown The VM subsystem already logs quite loudly if we run out of memory so don't bother here. Signed-off-by: Mark Brown Acked-by: Brian Austin --- sound/soc/codecs/cs42l51.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index 6e9ea8379a91..50c08c8fc9bc 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -574,10 +574,8 @@ static int cs42l51_i2c_probe(struct i2c_client *i2c_client, cs42l51 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l51_private), GFP_KERNEL); - if (!cs42l51) { - dev_err(&i2c_client->dev, "could not allocate codec\n"); + if (!cs42l51) return -ENOMEM; - } i2c_set_clientdata(i2c_client, cs42l51); cs42l51->control_type = SND_SOC_I2C;