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