Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967644AbeAONPR (ORCPT + 1 other); Mon, 15 Jan 2018 08:15:17 -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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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; } -- 2.15.1