From patchwork Mon Dec 25 13:06:13 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: 10132549 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 5B17660388 for ; Mon, 25 Dec 2017 13:06:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 461D02E864 for ; Mon, 25 Dec 2017 13:06:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3ACB72E863; Mon, 25 Dec 2017 13:06:48 +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 D6DFF2E864 for ; Mon, 25 Dec 2017 13:06:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752607AbdLYNGe (ORCPT ); Mon, 25 Dec 2017 08:06:34 -0500 Received: from mout.web.de ([217.72.192.78]:60336 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751681AbdLYNGd (ORCPT ); Mon, 25 Dec 2017 08:06:33 -0500 Received: from [192.168.1.3] ([77.182.230.95]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LwHkw-1f1qjR2BKA-0180hb; Mon, 25 Dec 2017 14:06:15 +0100 Subject: [PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe() From: SF Markus Elfring To: linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Haojian Zhuang , Linus Walleij , Tony Lindgren Cc: LKML , kernel-janitors@vger.kernel.org References: <6bc679d1-c1ee-52fe-9ece-b28095f653ec@users.sourceforge.net> Message-ID: Date: Mon, 25 Dec 2017 14:06:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <6bc679d1-c1ee-52fe-9ece-b28095f653ec@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:zQS8mUzgcVmFq5Tv/lF8mHe5POesSUEqr6AxeeWsDnzmw6ySBzS l4KwN7JxSxyei8IKDsTI7PBo7E+nQPPEmn1glkdhnx1/ZlkytLKgjs/czR7petKrDa7ys7/ t8DY6LzOqEObFkmOtTNQZA+BryQAFyFgkLiXFL6n/oi+aSF0eBCGvas5+vUCjwGrbc/zdEU ePBq74GMM+meVl9l7oYwA== X-UI-Out-Filterresults: notjunk:1; V01:K0:gXVytVB5sGM=:ZoFgD/zHov4osybnx8tPPn 0aMRBE+nBLOiC0meCJDwGCmxqopZ4hAuRS/L2dHS/QsqDKN40s4E75pd1CkyLam9hi9BqMr25 g6TomeUS4H0cw1ZUGzZwmABgVsJRooZU1GQfQJhpcIgkOHRFSDGBkTJlmD7fAijI6NIFcYl1s eWKJwZx9/XfWRuO1vvBcjfHxkYd/5QW7l9X6pwkbSlA08cUunkMGyLuRsS6O6Ja9D8wlSzKDX wh/NL+vPvCqAnvGWg9z/2JynT9naMMBDTrQTVCoTxo15I0bCODsOp9TBt++PUQ9SXAe8A4qhH KvoVxqkjLLOJEq1NvIZlFpMzOKjTolhg24+nDGpppeXTPA8FsnIwAeU+CJH2WwZE3RLpLHh4/ hgawANTCPnvL86AbzMfmfkt2a5HuDiixXjEMVe7jBdIIv08Ey9fZw4XwrgXF/kPAWMjFcIm2d cfLbvVucgIV+jf5NlwzN/HvFldnUqRceHm4E4m+GpvW+BRVMGDwO1cC7g+PgxbOWfqElytZp3 0kpjO/YJ7gtATmAJ8Irqg3xLyIjUnsCRBDi4g4mL4RrgC81tufMnAtb0ngbMZ/9Hw/mpmOW6s 4MxYHEANN9G2XyuydGY6ZMcoa2ygte230jC0ifSfHzYnAAB9itiaew4ybq2aUYwlvZ3ZapGJc N+uhCCZ3+l1HIOJNH97bnLwJ33NkneHYhzk6Qawf7QtcJdkj1WeawtoYhGSct4qMtVO5MwdG6 /6ohnEcr5XtIano2lyB5QDoegx8lQqAtkVLgTaFmq+na14YnZuGlApV/C7Z7i+uMi0wdgOARh wOYfuqGYvSmIJ++13mBcAXtavgOrMxMB4R7T9fDfnk3pZq8U74= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Mon, 25 Dec 2017 11:27:55 +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 --- drivers/pinctrl/pinctrl-single.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index e6cd8de793e2..f5ff2111481d 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1646,10 +1646,9 @@ static int pcs_probe(struct platform_device *pdev) return -EINVAL; pcs = devm_kzalloc(&pdev->dev, sizeof(*pcs), GFP_KERNEL); - if (!pcs) { - dev_err(&pdev->dev, "could not allocate\n"); + if (!pcs) return -ENOMEM; - } + pcs->dev = &pdev->dev; pcs->np = np; raw_spin_lock_init(&pcs->lock);