From patchwork Tue Jan 2 20:48:54 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: 10141355 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 C5ABA601A1 for ; Tue, 2 Jan 2018 20:49:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B69CA28DCA for ; Tue, 2 Jan 2018 20:49:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAD0D28E5B; Tue, 2 Jan 2018 20:49:22 +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 4B59628DCA for ; Tue, 2 Jan 2018 20:49:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbeABUtD (ORCPT ); Tue, 2 Jan 2018 15:49:03 -0500 Received: from mout.web.de ([212.227.15.3]:52611 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745AbeABUtB (ORCPT ); Tue, 2 Jan 2018 15:49:01 -0500 Received: from [192.168.1.3] ([77.182.164.54]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MSIwN-1eKYjk2LoB-00TQh2; Tue, 02 Jan 2018 21:48:55 +0100 To: netdev@vger.kernel.org, linux-omap@vger.kernel.org, Grygorii Strashko , Mugunthan V N Cc: LKML , kernel-janitors@vger.kernel.org, Daniel Mack From: SF Markus Elfring Subject: [PATCH] ethernet: cpsw-phy-sel: Delete an error message for a failed memory allocation in cpsw_phy_sel_probe() Message-ID: <3addaad6-2767-8a2f-cde3-a25148780f36@users.sourceforge.net> Date: Tue, 2 Jan 2018 21:48:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:uXrfLIe/FWlVf9FWOkux5D62dEG+6NbXgAeMOD5fEiFm5KqwPPz 8yPFZQFd/O+iEVYaKfzZIfzRFjBgXIAdRFsJJOldsqWsADkdUNzoUsLcP6StYPS8GOCw91f agVJkeGpNNsehYYMOZ5lm0OktxqYyctwZlc966zH49Y4fA29pOIboIZNkFHYqKwMYzERZkV StjiNV+ZXFvdqVGIvx/OQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:ECb8DN3k9i4=:/M2FBNYmZ5ZT/C189tKgKx kbEq1hpkv+ICYTnFX4jnM2oxmhV0vmvO6KORAB0hZZ/axkvBKtqwOfHgva9G8wQJx3W7nYzf6 CBzYE0re922U+VWjPHUB4vOW6LYMUUNToZYF4U5FCvr+DFzltt1JDs3pP6vQ09gxhz2MfKlLg 2NYG9FbDuYWKPPvWeXxCU9F1h0jCHjPUw+2bkf5UKicJUMs0bNG/qEG0fQErbZbc4RNKpvOSD 8ARCsOXOp7eSTZW8mfFbYOHMqx+VHx2jwFZjkS6JScryBCjtjj7qiYixdoEicRq/0V5cGD+Tu 75TJPVt7uwHns3C5jXihV0XRgZTvjf77s49DKjVW4SyL2l1mHc68CvuOg6HLBG69fWe29JG78 OU1DhiuRyj8UWGvDbrTYABB4o4OJjVPMDI+tT+fB1QsANem6UQlkXoHWUApeoxvlA7/5NPId+ LLgMkbvRu9ktPM8cb+BwcWQhb7kdh6oxGE0RXLpPfUz22xa2FKhwaxumbsxVzofL/o0uIeGpT 2gRRBuD2EtSMzULGes04JFTT9fnhC1iDeh6YD/q53EAk7mt43uAn/396z4RWmRI2pO1/JzjLK Vt4xFgyf7jeSoXir7pfB7fJe8Og7iOaJvHMbiNrmPCxJ8OWmyj9SAxrdvcEWL7AShmLfWkvmg SK3lZviTZO+ZCug8+mX5H4D4LVcKgGgJp2yJRT8MrT4J1jFQ/AWN3M9u5ocVx0RnC3Ohcp2OW xUiTSRG6mLnRl4Zd/KKBwPp1rhmyxj1P11HvZfr5mocKvHq6VK9rfmwydfChWdYPqAQGVr8Zv /4vzwVsuJVn8HdWj8YwSnmR4Ja/3dfbWYJ1IOcIEFhkQnb0q00= 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: Tue, 2 Jan 2018 21:41:25 +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/net/ethernet/ti/cpsw-phy-sel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw-phy-sel.c b/drivers/net/ethernet/ti/cpsw-phy-sel.c index 18013645e76c..d29bc349bfc4 100644 --- a/drivers/net/ethernet/ti/cpsw-phy-sel.c +++ b/drivers/net/ethernet/ti/cpsw-phy-sel.c @@ -213,10 +213,8 @@ static int cpsw_phy_sel_probe(struct platform_device *pdev) return -EINVAL; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&pdev->dev, "unable to alloc memory for cpsw phy sel\n"); + if (!priv) return -ENOMEM; - } priv->dev = &pdev->dev; priv->cpsw_phy_sel = of_id->data;