Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751291AbdFCUKh (ORCPT ); Sat, 3 Jun 2017 16:10:37 -0400 Received: from mout.web.de ([212.227.15.4]:61069 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbdFCUKf (ORCPT ); Sat, 3 Jun 2017 16:10:35 -0400 Subject: [PATCH 3/3] ARM: pxa: Delete an error message for a failed memory allocation in pxa3xx_u2d_probe() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <519a96e2-675c-5d46-f7d1-fc3146384206@users.sourceforge.net> Date: Sat, 3 Jun 2017 22:10:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:o98HZMbW00XlqGpwlywIjV+HJxB+ekuIx3SuP5Kkha4lT5FkVGV 4rPuto03tWlpThsquNQNd5XnI++4z9mazE47MYpXX1wwLqz/6EKpvfQXE3Z/j0pIlDb0eh1 NhbsI/PfTHtWPIAQ28cfKq6JPdUUTlWjWZlp2HHE+g18XCNp2z/7kmtr1Kl7neebrFhj02J sQul2bY/cvsjGSeiKdvyQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:CfT5WU8ThNw=:SJHteUYroodn5bajuRTGdJ XpFdaqOu+2WQ0pZfxXmpBodJBLop1HsNyj5wLyJH+WcoogBl0Zzk/Vy+88D9yLx0NAoto2Ji9 CBSHMqclET/RCewwEgUQpjsLyLxcbVhqhw0rdFAIcWkg7WJKllAYIgLd+443i81fPbFWnybvY NP+/jlRvjDzJFx+CTkoizNVK4FIjW8A10+5DohSW/hjA8P5dBn8pGQag8ZqSHpgRpHSsRK4tN ade8g8hVp/9GBSwQTauQpQVdswV6vkO5wgXzM/ZamGQgATvif/ePRTwUcidhviaziGNu67kYT qgWhs5isD1bcB+DmJjymJhzGUcClVKA+nW47ATPOwH9UNMwD/vaYmiwW/w55NJLNn9VP1Guyh xLaFXZ+Z3sAaLWFuYEleUtoH/q7VuBT2KNjISCSVRwXabdV1EFWWjLj+yU2yESpiFGu6Ym9W7 Jss39m6XR3nk4wC+axM6XUC5j+3c6hQlJgXcbG54Wx9fNbdKrBEGyzur5FjILDzHpEkPt2Wu8 C7p/9e44Pc3p0M4kEe7alavEjJ9tA9fDIBowcx+lYKmcIzznIAcXMLlD3jHr9P28LAiyijMNX SDNz0sXemT7XaKSpFTcnFTnwR9Br5oMKdKezJNRFJqf86Cv73hWR3jzTv6sFagBvvEix2YFKf 7FqvNKJCvW0O8TGhQOxKodEVR0z7oCxlHJ7HnkkpAuBZ6et3GwtWSRGzSSXDt3VrqNvDKriIJ tgXb7EmjaZinbu/lEbQyuJ4YxBV66RsKYCsBchBLAq+dPOjQQI8wegTiJ+HL6M9S3LsXcveHR GKJAyxf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 937 Lines: 28 From: Markus Elfring Date: Sat, 3 Jun 2017 21:46:26 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- arch/arm/mach-pxa/pxa3xx-ulpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c index 13f9909ac8bf..60cb59a7ebd1 100644 --- a/arch/arm/mach-pxa/pxa3xx-ulpi.c +++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c @@ -290,7 +290,5 @@ static int pxa3xx_u2d_probe(struct platform_device *pdev) - if (!u2d) { - dev_err(&pdev->dev, "failed to allocate memory\n"); + if (!u2d) return -ENOMEM; - } u2d->clk = clk_get(&pdev->dev, NULL); if (IS_ERR(u2d->clk)) { -- 2.13.0