From patchwork Wed Jan 24 21:21:39 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: 10183095 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 64E1D60233 for ; Wed, 24 Jan 2018 21:21:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52F1428968 for ; Wed, 24 Jan 2018 21:21:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46E2E28973; Wed, 24 Jan 2018 21:21:49 +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 DEB5C28968 for ; Wed, 24 Jan 2018 21:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932474AbeAXVVr (ORCPT ); Wed, 24 Jan 2018 16:21:47 -0500 Received: from mout.web.de ([212.227.15.4]:62657 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932238AbeAXVVr (ORCPT ); Wed, 24 Jan 2018 16:21:47 -0500 Received: from [192.168.1.2] ([77.181.242.198]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Mg7JF-1eSYNN34p3-00NPQm; Wed, 24 Jan 2018 22:21:40 +0100 Subject: [PATCH 1/2] Input: wm831x-on: Delete an error message for a failed memory allocation in wm831x_on_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, patches@opensource.cirrus.com, Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: Date: Wed, 24 Jan 2018 22:21:39 +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-Language: en-GB X-Provags-ID: V03:K0:+uZsO1OmSyjIU9jSrTs7sRMIpFbOre/sqetWMxutY+85QnZZzC+ zhcRN8NgRXyFfLFzwxmK+yKddXODUhMaLO0g7Nwf7lGtOqw3YhGUWs2rpWpDHMRgXwa3T3Z IlcCPqovojhl/OXHo0PBn5MgiOR5psLkvCYMhS66aUhalIWjrtKm3MbPXsY28r2sXDmlXzB UZZ8OMO0SNG1izMeLV4VQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:jL2tqNEZBmg=:QWtGuKRD021g7kX7NyHC6O rhzX8GEXsxgFBRqqcd1D/BOZhQwlq1k6mDPp0psWKK/Qu4ZjIKgbrg3oGNPeU1xQVLrnr0HpJ NQ4BWu/xEj+sl4roFMGE41Tv3K9eAsdXhOiGDqUJHAIuBYGcjrGrQNj5xSZ/axER1lveqDCqP G8aTiMYVfGK5wm4WJebu90zgN5JIS3Xr4e2edv02PyETT6SveqV3rIliJ/rWqnyxVkfQFbgGZ 7tExyLIjLgaXacuIQ6UF3svIS8q7MuClepClWLQq3pi0YWFQKmIBBNUz2TFrB47aKuIzS2hPD KiIy11s6LMzdhAlzRX8BMI//l3Drw0aCuLJPhuhOkPpG1OLXomK5IWsrIbQVNHBLpsCaDnOsj cM6pQAa1NjgmIka1eoI1HASNgtA/oQpFDdjI+EfVh6O7HzV0bF0AwPeQWxGieWv715T8Hlvue WeV+nbFaqgXcNheRfcyDPVLP2R0YUIBTGJVziM8+Cu9YLcaPOCTDuylvVPkLu+x01Cu+qUCH9 /p26X8pkHVnWu23oxptNWCWibkIQ8pu99mSn0KLH0A3iyYup/5Ll4SIJBEmSSo8KNYD71ZkZS A2HESqpTCofE8W3hh0gU1j3kNUCmHdTIjrWVKMu/tqxOC4gKLZKF7eLE6GkdDxX6qQPU2JlUw ZQDZm+yl5srjazlbDEiHii8HbwZYMByPRj7b5YIEMqylqBA1aA3SDZRVHHQqEnjhRxuxf6pRn 5SNEs+U1j88DLxqhbR8HNajhPHXznYfHJq2hkqavZaK0yxjNhWdDo6xw6iCwUsTCPDMCGXEvH TvqAkiDCXn3suj3fIU59HWRFaDndnmTGL8hMpnHMakztcMmYok= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 24 Jan 2018 21:55:49 +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 Acked-by: Charles Keepax --- drivers/input/misc/wm831x-on.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c index 1b44de265a0a..06f5c4857a0c 100644 --- a/drivers/input/misc/wm831x-on.c +++ b/drivers/input/misc/wm831x-on.c @@ -77,10 +77,8 @@ static int wm831x_on_probe(struct platform_device *pdev) wm831x_on = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_on), GFP_KERNEL); - if (!wm831x_on) { - dev_err(&pdev->dev, "Can't allocate data\n"); + if (!wm831x_on) return -ENOMEM; - } wm831x_on->wm831x = wm831x; INIT_DELAYED_WORK(&wm831x_on->work, wm831x_poll_on);