Received: by 10.223.185.111 with SMTP id b44csp481814wrg; Fri, 9 Mar 2018 08:08:48 -0800 (PST) X-Google-Smtp-Source: AG47ELto46nrotyckq/9uPnHStUGcMMoQY1XaX/Graou0dfoTEr9nsDD4TiBUbok5itqfotDhCBI X-Received: by 2002:a17:902:d83:: with SMTP id 3-v6mr28890435plv.47.1520611727892; Fri, 09 Mar 2018 08:08:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520611727; cv=none; d=google.com; s=arc-20160816; b=eiWdf4raRKs3gFx+UB+vXSI4gEATNmT1uajIjZ1GfyTkyjnzaGNpQj7qWcqSGiJq8q j//TEYZgdtljAjzYK8t45DB00PFqQema/nYgy3eppqf1cLpo6gk+cTk0DRSLx/b1iPhM MvjGOnV14E68mIpfcNCQR5BvN7FL//m4e66qpiqI5sXAA5xBvN+Q8lNx64qymPcgjKlZ QGKmdvjJKHRQ/WAeIAJWc89FuV63PrHIK5jRpzeBMqJUtwrxuuhr8bj3eziOKeiMkp1M ookff1jJc2aoO6wHNKBgS8fhNRmnxoHy3ayRPdgfnNNSitwtGUMKlpJqAg0zMnm12eXa PsvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=16j9vrGB7VGnZtyUMjLMGoa3yQO01+cGSSaFcIGBW0s=; b=E9E6gs3A0wyrfd+1z1wjqIYjYmT/C55M3dtLttfrCfg4X727sTP7H5Tu6KZa0uSoin gvGz6f6k5ZsldpB37VvqFgmJfH2by+EUVhnWZ1546rARk2MPhBmWL5oFoEk/8Sr/KuNo LYOZgKQa2kPerm9+CaIAX2oGlef+mpX8cuLTtG93K7yR+Iwi40JL+x46v+qZRKn/7uRc nkho+TTSbx0owBQBtKsyrUwq9PNIRGMKe6NchsfT5ldNe0f9EJ42GJ1p4utVjCb/4ckP +wK/2hbaaSUC8N6z1vSMwKMm3YbNz9DMFTrNV6HdRX/ifhiMy49n5gaHeBZIuKRaDWCF 91ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h67si893817pgc.324.2018.03.09.08.08.32; Fri, 09 Mar 2018 08:08:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751231AbeCIQHU (ORCPT + 99 others); Fri, 9 Mar 2018 11:07:20 -0500 Received: from mout.web.de ([212.227.17.11]:40995 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbeCIQHT (ORCPT ); Fri, 9 Mar 2018 11:07:19 -0500 Received: from [192.168.1.2] ([92.228.30.253]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LzsGF-1eXwEY0Mdf-0153QE; Fri, 09 Mar 2018 17:07:17 +0100 Subject: [PATCH v2 04/17] mfd: si476x-i2c: Delete an error message for a failed memory allocation in si476x_core_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML References: Message-ID: <77d99255-820d-1152-0c5c-88d8cd2f26ab@users.sourceforge.net> Date: Fri, 9 Mar 2018 17:07:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:TYOSkOCO/llWqXDe3egrlmpD3glNEJPxi8/gutK5KwwOrvyi5Hx I5Dyua2xLGtBBtUlv2WUXFaVs0rcFAGg7mS6O/pxvqzr+HuQi2e1N6M4LqKYGg5Zk8mGJ7u g1M67PSNvxcWHFvg0yA7OYxNKocq3jUMW51uh98FkMBs7EHNNQyv3F9JWSqx1gEbANW1g7s +dr7TZ1ibnrE4SneGdi7Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:QRrbVsnD65A=:ady36uV+lfwE6Xps7Lk1MZ C5IJBogMJ7FQ0N3+sj2fu28MEpVUJhKZbPkV0dBpvR9LivOHRYT5doR+Oh6WmYQWXs//8JuXd CB2B2HQOWQ6txzGsfLdTlrJddBSe+2TO6IAr0dUFs9e21nWupOx6141050o2szrOpFZgfd7bB laUE1BMCnWPqht1Lt4dbw9JbMzXuj6NkivgZtNPUZrpY+crLEeJi2L59WQ+ocEERQVUa70WF8 rUI4EYGYC2wqw1PGHZqhjeobowz8W23SP8OyXXy4CkPggyQfteJ2IfaZQq0GQPkhMbq+9/KWB LneuDgWWn1ivxWLOWYyIcJ9qYv9EpjZxGwQlZLF0D1Pv3hz2BIHB5plNTwk+qOHkgXTebbTlR zDbv4q4dF6IMY7sPCE+RWDAkRjUlToPZmZ222jfnVrYqdx+zksRbgf02l+nNs/7exFG0hVgCL MBMw278DR80X//mH0SS2f4AtpcBpmh91gPF5fXSS/RcEe+jAlQjR19V+y2b+7/2osQHQeBDku GPvJcL/j7f1jkFv21pDvMYvZ+iXJKRp2y9LAWkDT3KJnjhv76cbn5iDko87bTfLKyjf05cCJE R3ZMHb/7h0bd9V6WJzBO0R0oq6x5IqvGOe52ufqmVxArzs8lE0fcrCTPqkKJ7WDf5v/eHREA3 ydtr4IABfsbxm3jt8ydvPyneNtI1qS+qI3s/1kePM0oFGaXTcqJMP66ZyMm90x+5yjZuA14pd ioNS5xgTNut8gl01izMMjelskqrO9m2J2nUZl1V71+wCZx7gd6xtzNC7fPa1WKAUfMALiMEu0 bNzH9xH8p6r4APp/6TREh7wXCRDZ6taAPKI9jfeVXcSdZhbtl0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Thu, 8 Mar 2018 13:45:31 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- v2: Lee Jones requested a resend for this patch. The change was rebased on source files from Linux next-20180308. drivers/mfd/si476x-i2c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/si476x-i2c.c b/drivers/mfd/si476x-i2c.c index e6a3d999a376..2c5ec93333c3 100644 --- a/drivers/mfd/si476x-i2c.c +++ b/drivers/mfd/si476x-i2c.c @@ -697,11 +697,9 @@ static int si476x_core_probe(struct i2c_client *client, int cell_num; core = devm_kzalloc(&client->dev, sizeof(*core), GFP_KERNEL); - if (!core) { - dev_err(&client->dev, - "failed to allocate 'struct si476x_core'\n"); + if (!core) return -ENOMEM; - } + core->client = client; core->regmap = devm_regmap_init_si476x(core); -- 2.16.2