Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754720AbeAGV33 (ORCPT + 1 other); Sun, 7 Jan 2018 16:29:29 -0500 Received: from mout.web.de ([212.227.15.3]:55014 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750965AbeAGV32 (ORCPT ); Sun, 7 Jan 2018 16:29:28 -0500 Subject: [PATCH 1/2] misc/fsa9480: Delete an error message for a failed memory allocation in fsa9480_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman Cc: LKML References: Message-ID: Date: Sun, 7 Jan 2018 22:29:24 +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:8CuVsvZafsHsBGHKWbNlscM/0uHbget9I8Xri7+F4ihYret8AKQ ibuZ/N6U/wMpDJ49HrotHZKg44lSpLgzVYtTmtrR7WT84IgqFMQayz9W9yGUPjbNvSQkywP oo28lhKU+lDslXm1rPKNDmY5MzenwgqGxJsvvqQZYyYJk8VAnXCPk/vyKjkiRFhKvXhrlEd 24nhug+jNMAgtBDMLRvEg== X-UI-Out-Filterresults: notjunk:1;V01:K0:+Nbyab5iXN4=:k/uK4VrRS9o6pmpJwU4Gq/ bnz5+sizeKj0GvUKtphgAq9QPeTnhliymTxVr0fOK5gguMCy4JLGYtLeyyII4/A9FyvBVy/Bx rScTeQlMlqgMKhUn2TMu3ksZONsTi7vwC6SFhj5TNtomF3JH08fmEduWn3SV+ukGa2F/8QzG9 cXBG/5tpIh/e0ZzxiM+dGDI2B4AmOp/Zslq9mWZdqfO6Be2vbkvwCgWa46+HbWl9FEfCTp1iH Ih2UYxP8d2VjcSPD2vogBvBCtc1KCYPW2mCkRL8kBR6kd6Msnv2s6q3PHwncFo64f13Ug1pYs NKbk3HzQp4CWjwBHCslybfhiqaGFNB2tyrPn47oggLJugzqBEZ1RlJU9Y6MqtNtqiRrRLQi3U XZF2JPI0uHcbwi0OA9lEvwuO2tl4UIhOt/L6dKNDShTD7h32nriv3OvaTaIhDPEk9C6WDnPcT QZNkUV58ol57JrYizL0MhIVCs3+pWjyF9yFHxoSqIY7QXYeBhzk5ytUZguERFi3EsAnIJ1edq PiQhVjqGQLgg64MEBBaDKqmcWsc7yASbkFWzPboX1sqTcwsTTjxKu7igUQH+d12tnMwvxBpnH mR2JP2WP5+GYyI0rmURhOceXQocoI7Yd4AV1Biwm0Btn8HsC5aPZR8HOLT4NhOVoBj2rx1SM3 T+AEUj9lB/4nB6WTAJjPJcCJOY0vxIVTxq/3/GL3TtkMaYnI7D1vLjFttuWq7u4BsgUg63hPx MiTl4TkZq0kvTCulUiWRz24cCirTgX4UfIZYzUtt0y0Jp5u28HcZeiuLMDG9sfUg/pC0NICtN ly5jn3P1K71BKDgL13/cYCUgMRaxh+v1iZclsUwHvqlevNBJOE= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Sun, 7 Jan 2018 22:17:53 +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/fsa9480.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c index 71d2793b372c..4d7f763195bc 100644 --- a/drivers/misc/fsa9480.c +++ b/drivers/misc/fsa9480.c @@ -418,10 +418,8 @@ static int fsa9480_probe(struct i2c_client *client, return -EIO; usbsw = kzalloc(sizeof(struct fsa9480_usbsw), GFP_KERNEL); - if (!usbsw) { - dev_err(&client->dev, "failed to allocate driver data\n"); + if (!usbsw) return -ENOMEM; - } usbsw->client = client; usbsw->pdata = client->dev.platform_data; -- 2.15.1