Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965099AbeAJOpq (ORCPT + 1 other); Wed, 10 Jan 2018 09:45:46 -0500 Received: from mout.web.de ([212.227.17.12]:58319 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932218AbeAJOpo (ORCPT ); Wed, 10 Jan 2018 09:45:44 -0500 To: kernel-janitors@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman Cc: LKML From: SF Markus Elfring Subject: [PATCH] spear13xx_pcie_gadget: Delete an error message for a failed memory allocation in spear_pcie_gadget_probe() Message-ID: <4890202a-cb60-bcba-781d-4823f3e58b0a@users.sourceforge.net> Date: Wed, 10 Jan 2018 15:45:41 +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:EmgPoGuN60HakrsxEfY0cPhvyXVXpK6DUqXbYC2Dek2niZXQY85 g9SrZysrF/o+nZK6fopZQFvfGOzaJWf9lxuaqPeZrob3qDA5IcO9717EqZsxrH47HlPGL8Y QGwoneU8mMOcP9KrXDD3h8d7IqYGvEPCgLGnisW+Irhn9TES+gJtRxTsJHAcERvn1cLdzIu Xz6WEggphAIWez322KQPQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:2M9D5bBOxN0=:BAATzsciBxgcHE74AQPME+ Ry72gLJqYFCO1jSPKWiLbo/xr+q0moMZj3d6mHkJNIqbPNvtt7Schl0Q0+azhiAB5iISR7ctk ey2NfPzbHF94mbbEKmY561Y17NO2PDwsYJgoT3vTiAsq81bmIQNpIg8/MibgQoLUYaHXALy4F wT34CE7QvrkUVONsRWFGaNZOYN/h3/udoGW8DT2TL//EnZ8ye0vV54q6YDJV8irzQRzu4qjAN SKVr8wrtuimKsilRFL50alFPCSb8tx09XLv/yqQe7aHTZpXto+fDKmPH+f6BS6TlqY++0hbQm VTmvSm25CxBy1XaIJRMkf87Q7VWHkdSnqmVvtDgbdYJ3VQakUQBisXNSYhZOhSbyHwPs4BAYL 8c+USsnaJkY371GTpoTbOc7t8DrtsSgSc0txuvJHoPwZ5VCqMJ5AvedeypLQDt0BMuHDOFkHg DUa6BXcjq6Tw62TdVMKoWVmwiwxFVBlst6jWrXSLN+ZQUTejJJ92dADmMbRvbjurAGzL8/f4r +ngHvCLYBYmC7uQZbOEt1n9N0OA6gO51eypo0sLaK3nT8So9Yi3HLsB6eMEpwNhbVz6/8qxTJ ZrxIHriqnWEriadEelyeJacR9WzqcDyBYnGYIPuFdsx93VS5AKMpzfwZVUw8bsZtAakpfgTCZ bbiV1g9s51HTuYX/aGHE1aIMBJnjS1qKkMzmz32K54h2pZ1BmT5Vu9o6/zg0e5BJl1ERAMm+5 W0rr6jT8t/793l9b7IoxZ8E2AhYbkA6PIo+kFRMu2hZGrN6J56jjVxyDlJMLU0wOIwycsqvhy e2w9biXIS3/omDR2xy6j0TVPlAswnCHLRvopSJ0UAbGetHF8PU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Wed, 10 Jan 2018 15:35:14 +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/misc/spear13xx_pcie_gadget.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c index ee120dcbb3e6..75d5ecb2961b 100644 --- a/drivers/misc/spear13xx_pcie_gadget.c +++ b/drivers/misc/spear13xx_pcie_gadget.c @@ -671,10 +671,8 @@ static int spear_pcie_gadget_probe(struct platform_device *pdev) struct configfs_subsystem *subsys; target = devm_kzalloc(&pdev->dev, sizeof(*target), GFP_KERNEL); - if (!target) { - dev_err(&pdev->dev, "out of memory\n"); + if (!target) return -ENOMEM; - } cg_item = &target->subsys.su_group.cg_item; sprintf(cg_item->ci_namebuf, "pcie_gadget.%d", pdev->id); -- 2.15.1