From patchwork Mon Nov 27 18:53:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 119776 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp2103078edl; Mon, 27 Nov 2017 10:57:08 -0800 (PST) X-Google-Smtp-Source: AGs4zMY10eliPT3mVM1Hurmx1aSeVZPbatlMrrGSvbo9n1cGfZsmqr8IzhQXkjNNOOTpp1/rTTCF X-Received: by 10.28.5.201 with SMTP id 192mr18326571wmf.142.1511809028757; Mon, 27 Nov 2017 10:57:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511809028; cv=none; d=google.com; s=arc-20160816; b=CXXh29VCONPEbOa8CuXtVkbrJUy9geh6hDLQlYOx6fKum1chdS7gsduXdhcJpzk9HB 1dxyhmBL496I2XiRsry+3O72Q5XYtGy7wYV4p0Wxi/76aGW6qkERjSQmQvZvre5dh04a pzFUKQNui1C2nMaZ/cMgte1U4zR2LjbIeX60pbxk5Zxyr3ispt4tBSSPzGRQ6a55qJfL TM29U6zrgZcs0gREnBFTjHMZebtEd48NxLcwXaylTxb3aD7jK1jG5jwZq89xdogqn9Fy AyUqA/UXmDGpdhyB9CvQJokpO1TSrTa+vvwNNdrK4IuVf0jXDJ+ahZfZ+lVOHsyI+nB3 E0Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=UzWMv94NQJC5kBWSrqc3KSqNSf9N6fvrxjGCNlii0Hk=; b=VyGVqibwLkyy4RQeCY/yRfAOoSHvgpR8jC8R34197ttwNnsHLOOs64ctEToMspiB/o M8yDpglYFDqxkqc0+1d2gpocvWS2s/7Gek8yNWoMWo2AhU0RNlWcMmfZu4jL7EpOKGGF M6QaM8aNd7oeKQ9TFbZw45wVuvSXrQatyaxguR2Ji71hyIcmffPYa9aTqgFjeNLoCRzL 7yjJxIi8uvPTYK9vz/MQAKAQbQ42DySQ14ZS1AfG7aH7KC04DIY4+t4dNWkNmpgF+29y iJG+bUFw9PVj/gNqBpVmRs9ciUugklLm+p0zsWlaZTqCwDu0OIHatfhmFnq8aujKRMvv SRLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=GQMrQYWM; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id v61si15163502wrc.23.2017.11.27.10.57.08; Mon, 27 Nov 2017 10:57:08 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=GQMrQYWM; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E54EB2676A1; Mon, 27 Nov 2017 19:54:16 +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 E300C2675D4; Mon, 27 Nov 2017 19:54:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 5C178267614 for ; Mon, 27 Nov 2017 19:53:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=29V+vdT2R0c6ewAscYeUYV1Exfb5E2o/3duG5omujos=; b=GQMrQYWMhgxH ZmyPB2MV5hYkPo5MT+TZjXIIPEnwhM7+q8/Rz2ME59hdd7DRIpmvWFsjhXDRVJ7E4/g2pVy8lrJuF cTOwIl6H6lp6WlK7xwU0w6SNnyw0bYo53Xfgo92vP0XYAP+EZc+ByGBYt6VBwpfVel3kGeTHc0t1T ZjNXc=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eJOWd-00071o-8c; Mon, 27 Nov 2017 18:53:03 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eJOWc-00079F-RT; Mon, 27 Nov 2017 18:53:02 +0000 From: Mark Brown To: Markus Elfring In-Reply-To: <8980f9c6-f559-816f-9ec8-e22194e0f3aa@users.sourceforge.net> Message-Id: Date: Mon, 27 Nov 2017 18:53:02 +0000 Cc: Brian Austin , alsa-devel@alsa-project.org, LKML , Takashi Iwai , kernel-janitors@vger.kernel.org, Liam Girdwood , Paul Handrigan , Mark Brown Subject: [alsa-devel] Applied "ASoC: cs35l32: Delete two error messages for a failed memory allocation in cs35l32_i2c_probe()" to the asoc tree 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 The patch ASoC: cs35l32: Delete two error messages for a failed memory allocation in cs35l32_i2c_probe() has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 410afed04b130fc1c22f82b10b20aed1636d2f15 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Wed, 22 Nov 2017 20:35:06 +0100 Subject: [PATCH] ASoC: cs35l32: Delete two error messages for a failed memory allocation in cs35l32_i2c_probe() Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Mark Brown --- sound/soc/codecs/cs35l32.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.15.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c index 7e9806206648..e41d8ebe6eea 100644 --- a/sound/soc/codecs/cs35l32.c +++ b/sound/soc/codecs/cs35l32.c @@ -358,10 +358,8 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client, cs35l32 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l32_private), GFP_KERNEL); - if (!cs35l32) { - dev_err(&i2c_client->dev, "could not allocate codec\n"); + if (!cs35l32) return -ENOMEM; - } i2c_set_clientdata(i2c_client, cs35l32); @@ -378,10 +376,9 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client, pdata = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l32_platform_data), GFP_KERNEL); - if (!pdata) { - dev_err(&i2c_client->dev, "could not allocate pdata\n"); + if (!pdata) return -ENOMEM; - } + if (i2c_client->dev.of_node) { ret = cs35l32_handle_of_data(i2c_client, &cs35l32->pdata);