Received: by 10.223.185.111 with SMTP id b44csp521828wrg; Fri, 9 Mar 2018 08:48:17 -0800 (PST) X-Google-Smtp-Source: AG47ELsJnFXL6kSfZhHc+htGB2kli0Kn+5HcF31S1/v8pP8SFPzevlUP2aO1oS6LMSvGy4osDSnX X-Received: by 2002:a17:902:26a:: with SMTP id 97-v6mr28500563plc.3.1520614096965; Fri, 09 Mar 2018 08:48:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520614096; cv=none; d=google.com; s=arc-20160816; b=hj4cubTopkjDRTsZq+QX26NtQofSdJOIIbPT+RyugmcpB+n0t8zWZblxKinrVSiRHL lIA5r0a7mXMFLIjoCKPkX2qPJLbCm3cgbhbN1C0Bg9pFuzDZyB+BaFwdYp1OPGGMoee0 oqvGb3rXCPrV7H84bgrwHgq3F2MeLULC7Ny99aErVHzDbrPiEUuzGdXEnrzf16G6cFle kMB/V/6dNAttJJnQYbQtpKHg6P1OajY9TOTk41uxRRaJfKks9br1TJuMMY5me4Jl9oUH 4bDSd+Ka1fUKKgT5u6QYn9Ljaclp0IdGN0z8UjN5OgOthY8Wzyid6d/eldYD5+RR/4kS 99YQ== 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=Rs9T94tYjbn7y2JPZ9hd60rultMYG+2Rtam+EXLRqis=; b=y5lnQHZAHL5XmTeIKaKl56HDjM6ONWI7m4QlgIHssz79sybs+q5BTMPDxZO3CliG2/ X+ABVrFLCvmhB5Urh94e6gbc87WeFr1ID8pG3jk5BEE8RoV9ey/hU/f/pHcdiCZfnv+G PtQlhHRauY2ySAF52S4RfCL7IxiGdv1p7qDLJxGL3QIUQRdfEYhtv8VWU7SUvKNgL2k+ aRdyf/NuzDvBEjx+FGlqlEd2Nhe7re95/pPEjVXBLaD0OrLnARSQ6IcxAR+LiiWVWNin a/OCwed0v3ljHiD0/Dep4LjAKjF7cTHStjz+US2MV7eumm5QRw0by9YMF01HHOcaRCKK Z4zA== 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 m68si1135816pfb.305.2018.03.09.08.48.01; Fri, 09 Mar 2018 08:48:16 -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 S932157AbeCIQrJ (ORCPT + 99 others); Fri, 9 Mar 2018 11:47:09 -0500 Received: from mout.web.de ([212.227.17.12]:60679 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbeCIQrG (ORCPT ); Fri, 9 Mar 2018 11:47:06 -0500 Received: from [192.168.1.2] ([92.228.30.253]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MVchv-1fAZkp3CtL-00YvSJ; Fri, 09 Mar 2018 17:46:52 +0100 Subject: [PATCH v2 15/17] mfd: tps80031: Delete an error message for a failed memory allocation in tps80031_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML , Laxman Dewangan , Mark Brown , Samuel Ortiz References: Message-ID: <25f40839-22b0-26de-591d-cfbbf4b28547@users.sourceforge.net> Date: Fri, 9 Mar 2018 17:46:45 +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: 7bit X-Provags-ID: V03:K0:Al7durf0UYhL7nYJILigPKIbJxWYkWcN0kmt5DID6tsvnh9N9UI vsPOncJx+rCmivFgGhxqrNwQUEM7mMXCCDcAXIP7p+K4Gp07rUcMHPY97l16k44wI3Y7qgw VaNUWfohxZ9wYyo52F9Jnw4xgwGG2FrKicUGrbjC2RiMGph+bFW99YQavIYJwygcTSGjbdV uSDEdShTqs0hCzjrRotVQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Q0S/sItaY2w=:+ZqnRHHSSs2DvNUQzZvzLG VDWJ96VwcawiYSA/bbB7RRcsW4SLkJGTyxjhLwXlpO0a0y+GA2IySfl8boTURKfU90RKNqt6F cJdseeJO4toD0S4OPKJ4eFag0pvnbFsyjgZyXGQ8fxnEntVgW3+c47LwuOTxgYL6uUtlY+kXb I6F7l3k+LUU+/2yWKOoMOG+2xfbBx59N1RVBMUfDmzwAazw8Ptin6gWz8/B/T86X/iRC52oAZ KbO5z0y/aE2/32U6EtXcKrW5NQR+i7Ik4MmhpBe/2dWPvuo7tN9zNKC06UIW7dsMVFzjrDv40 htYYk5JL1fqaJ9tUf9SP6LLmr1m9JdgALhl8038K5GuLOwtB/ElJ9ECtpA65YsfMtx/lfMpvQ 4F/IARLWmU5/2iweDJti+0U1WtuZazp5YvB4OHjbZwazdWNN9su0+hnDTeWwkwHqvKtIFUdEX ODltGpS76aHxciARLqn+f7Df1oLjj6oisayLs/EyQWi7db0TOaRh9K9sfLI3Sexg1j1QJTTUr fTdnR60WC5BNVYp53NAlmKCOvKQqbcYHIUl+DdMFN1bx4e5oXfFf50orw8VssW2lMjL+jsHmW umhW2vYvGwcMuNnkyI7Af7ODg6y67n4ea9FK9uQLuHLwGZG3BIyV7nvisvLc1uokTaTpu6dKe tRogjC0dL4/JjfkHyD7kp7eP6zDBoBUpA8f9KvE5X/QREMgwKFS3wU4e19Yj2yVx7sedZ+5AZ hbMHid2k3/XPSPxq/EJ0Uq/qt/33eKcd3sb2q5whAy63InoubDK/V98SZOYlLPS8ylFa3fzM7 zmGux0kcGfRzV0rpBMPLS1kgb6osgaErP1M1KkUSbIV3/QcWR32pBQq6htLq59LPNXPPeRbKn qTqaviK9m8Me4uA2JBZlSVInu6MLef6g8D84BklFERyTXVCkfk94MzjeJS8DGl7u6UM6MeMdv V+grTjAgFandf5HeVmN2FlUDx7fGL1y/mZdfnRSnjVhgyaNL+PhTTH1ZBVsyhas1p1j4B/M0e YqU1crb9PjEYFKchh/KonLw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Fri, 9 Mar 2018 09:45:13 +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/tps80031.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c index 0812df3b0d47..608c7f77830e 100644 --- a/drivers/mfd/tps80031.c +++ b/drivers/mfd/tps80031.c @@ -431,10 +431,8 @@ static int tps80031_probe(struct i2c_client *client, } tps80031 = devm_kzalloc(&client->dev, sizeof(*tps80031), GFP_KERNEL); - if (!tps80031) { - dev_err(&client->dev, "Malloc failed for tps80031\n"); + if (!tps80031) return -ENOMEM; - } for (i = 0; i < TPS80031_NUM_SLAVES; i++) { if (tps80031_slave_address[i] == client->addr) -- 2.16.2