From patchwork Wed Dec 27 21:10:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10134067 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C424460388 for ; Wed, 27 Dec 2017 21:11:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A449E2C446 for ; Wed, 27 Dec 2017 21:11:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98D532C457; Wed, 27 Dec 2017 21:11:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 450482C446 for ; Wed, 27 Dec 2017 21:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751964AbdL0VKp (ORCPT ); Wed, 27 Dec 2017 16:10:45 -0500 Received: from mout.web.de ([212.227.17.12]:52642 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbdL0VKo (ORCPT ); Wed, 27 Dec 2017 16:10:44 -0500 Received: from [192.168.1.3] ([92.228.108.193]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MfHsM-1eJw1S1ROc-00On8G; Wed, 27 Dec 2017 22:10:41 +0100 To: linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bjorn Andersson , Linus Walleij Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] pinctrl: msm: Delete an error message for a failed memory allocation in msm_pinctrl_probe() Message-ID: <0d5eae19-c8f9-3280-e68e-419646535512@users.sourceforge.net> Date: Wed, 27 Dec 2017 22:10:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:lBaal87ncdpyw5boYZm/rEy2afOUoCghpns0i50S9WgnleBbBzO nTDpfmPMGICLJP+1yJMBu23Z/7WG25Ef1kv3AGbxTZxLPyefeyLrCpRJ1151JQdg7WJbPkQ aIguSd7rkl86tBrj1LKOIcxDrcWSISBPn/zA+YaDLqgZUDbvXheRX/WCpOtDhnTFVluDIV/ EwKhOoB0kKK1oyT/sb9Xg== X-UI-Out-Filterresults: notjunk:1; V01:K0:xKh7v96Gieo=:hVq2qYq6Z7K0PUe9vacqb/ 36S4LBHtV1EjEYznSTFfOvUNQXP+ZnrfoocahBrjkswEqz3P/9U0UgLiVSdePghUOPAo14Q9a vTvqG7LGOIKNV7R9xdOgK/aq50ARpDMff6QCp7a03PjkMgpR0W0okxUMrwfK/6XJkOtBozu54 2IgiQoCASZkta+4SidQHgi4qHDs2xLm5oXBkMcHKh4Wyj4Q10vbKGiYDY11d3l7JLXpeA7lSr X7SOK667hllUCFETPrmPXB9Xl+QUChwSNct0OqUTbbCYnjaE1HxfUyCBusyLR9MC3BMkBhY+8 rL/I/1iGCqL7VIssozMuCWI5gATZkbjo3R6NEBXk3n7/J1acVB+kqa/MfA1i/Pj+aM0HueJyb rqAdbc+g9V+aRCmFXOBpbxeceIU25AIuC4xVGPqI8z2I6YKdQ+JH9p+29DAyC1cfk5DliILzT AJ4rXpD0ffLF2etRXwC+w9hpCYRbPi3wViiYvM6bTOVMaGLeBGTFWiIe3xJWQrdiZP3xhMbQ9 iTwZmQKKzUEzsLn3tYJWsjG7pn6GKYSsPAPyDoinNyLJv9T6F1kxAbR7s9wJDWDCOvNTn8m1L 70EAf4fCNzprK6NdsF7aISU2kMyTlPIncjM85rwKrwTJ4QOpjKXUV6M7qxliKaiN7M0EuY7pg LsDWvmGltRnD36X7T1XJGM+StuRhoGu2r3Djv4F41oZb7AvKMHI9bgnDEHnRtkd3CZ05gTyTr E3ICwernsNmK8JB3G0JnDWUH3cBbMw4rXajc2pxoEtF2g51+vmc4lE5wxV0qszwqlSzFBt6/h ne0aBmFdsee8S7nm/266nNkweC+fSOIdvarZ5UG7TMe8yBhZb0= Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 27 Dec 2017 22:04:22 +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 Acked-by: Bjorn Andersson --- drivers/pinctrl/qcom/pinctrl-msm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 7a960590ecaa..495432f3341b 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -898,10 +898,9 @@ int msm_pinctrl_probe(struct platform_device *pdev, int ret; pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); - if (!pctrl) { - dev_err(&pdev->dev, "Can't allocate msm_pinctrl\n"); + if (!pctrl) return -ENOMEM; - } + pctrl->dev = &pdev->dev; pctrl->soc = soc_data; pctrl->chip = msm_gpio_template;