From patchwork Mon Jan 15 13:15:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10164179 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 7761260325 for ; Mon, 15 Jan 2018 13:15:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6954826D05 for ; Mon, 15 Jan 2018 13:15:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B9592679B; Mon, 15 Jan 2018 13:15:34 +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 ED1E82679B for ; Mon, 15 Jan 2018 13:15:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967607AbeAONPQ (ORCPT ); Mon, 15 Jan 2018 08:15:16 -0500 Received: from mout.web.de ([212.227.15.3]:59143 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967606AbeAONPO (ORCPT ); Mon, 15 Jan 2018 08:15:14 -0500 Received: from [192.168.1.3] ([92.224.130.50]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MVu2q-1eLiVz3tqS-00X1zN; Mon, 15 Jan 2018 14:15:12 +0100 Subject: [PATCH 1/3] mfd/omap-usb-tll: Delete two error messages for a failed memory allocation in usbtll_omap_probe() From: SF Markus Elfring To: linux-omap@vger.kernel.org, Lee Jones , Tony Lindgren Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <7719b4e7-1081-6fa4-6f14-f45cf062482d@users.sourceforge.net> Date: Mon, 15 Jan 2018 14:15:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:+kHvymOivwSEorF+Q0GKn5CFN+ZM4201j4wLlFOVAI8ERrzzACw zrk9uvC33EA6RYM1QO918Qj3yRZaRnhbVmdkbxAzLCrMR36d6/D+fqrtQ2Hmr64ScUFuqUW uO+cmGyuPV75FGmzfhMa06azqI7b1cjM+576fJveK0PcAkCNl1ejTFIHjIIWsGa5EBr4tNK aE+K4N0ozWklCh4XO0N0g== X-UI-Out-Filterresults: notjunk:1; V01:K0:lSCeW/YgzM0=:L4nm8bB64MFTxngK3qNial LJ2rbNH7JioUqIbQHiQi00bNo8DZFfI4CW1uFdZt5BQLpNqQ6WwdIptlAQU9JkQrACUisITqL Jetdw287ie7CknAotPQtkZGxIKFka90xh4/rlZVQUieFEvxwkrrm8jKeAssaWIsYLZzBJDwPC MRjCqu495GyW0NctYsUHn4isU55bAJapl5MPKJE2gSojFVkEiYDHOb7p6EegOhY7YdNqDpQBY EA0KvdlkzG9AqqlZUKXTZKeqlUQRTvn/mIrfcW5xB5R9GNRweC/iMeObiqWExxeYziewgTcSd z5y+L2UjBDDz/tmDTFBDlkZ/yHEL/u4mbAqpRRt9pzE3pjloa5l2nf5AUMVkS9dx/VTeHJC4F jy7KquW/kvBb7uZmhFYypQwb+47Ih78m2TYjTjB8QGK38kmmhLURHJBQGpPazR9Zg4XhAP0z2 NBIhF4nzp20/PJVnOhy7kBxKXk/kUpk2/7cpTAlc0Xj5XT4LlixiP9uRL50yj39Lg/KFPtRhz 5I5Qdhtmaab+ODL4x22KjpFTzkLYyBHcIo4+QbuIvPBzB7s24ImvRmwqN/WCeSjJyOfezBL6i o0g3nlHQ3CesZ482YLg3tdwWe3X8QJTDn8eEWb6OC6etFozXTHG33oxpHRHyAHKnoAb8EQZCq VoPriSZL+bp7fT6kz1sfs7RxLVWXEu1Sf1Vac3iMtjYbAqd7MffoJj74Ufu9vI/sK145ZEr9F G1vdN7Vg3a2QMWbsDJ1uv1vFf8tbJL4WUIYAv/yroxnlshp8cQQpL4/snDjvkN4JsgfL3fFzV V2bTkt4wBU/wLk6003q/nXkBylRhRvNircPGpPrZCgK69AKGEA= 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, 15 Jan 2018 13:39:25 +0100 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 --- drivers/mfd/omap-usb-tll.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 44a5d66314c6..7945efa0152e 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c @@ -222,10 +222,8 @@ static int usbtll_omap_probe(struct platform_device *pdev) dev_dbg(dev, "starting TI HSUSB TLL Controller\n"); tll = devm_kzalloc(dev, sizeof(struct usbtll_omap), GFP_KERNEL); - if (!tll) { - dev_err(dev, "Memory allocation failed\n"); + if (!tll) return -ENOMEM; - } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); tll->base = devm_ioremap_resource(dev, res); @@ -258,7 +256,6 @@ static int usbtll_omap_probe(struct platform_device *pdev) GFP_KERNEL); if (!tll->ch_clk) { ret = -ENOMEM; - dev_err(dev, "Couldn't allocate memory for channel clocks\n"); goto err_clk_alloc; }