Received: by 10.223.176.46 with SMTP id f43csp1258210wra; Wed, 24 Jan 2018 13:22:30 -0800 (PST) X-Google-Smtp-Source: AH8x226W7RuH51FZxhRaFQInlXcJu2b5saB3qkGlBs0nfDkUpA2yk4EwY1PFyJYY31TWJljFR6jO X-Received: by 10.98.155.157 with SMTP id e29mr14039129pfk.78.1516828950729; Wed, 24 Jan 2018 13:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516828950; cv=none; d=google.com; s=arc-20160816; b=0T5bBx2VtfYFsANVjmttEynxG9Q0ep65p3dhugELlgpP1cA6AyUyeiuXxrx2plyJMd Z/5537a5BTqdpJDQ5JBmAMQ+hcx0YMavxZzdzQYP8w82UqxHgN58eFoZ9CEq4oagnnMz 8cJKlWB5L9jr7HspAhr5JdK2+AYbnu+qCJ6KDyp540vyWD81DyXfD7WidD65BiT67s4j 7Bz4fljvZyAntyhIxCsZdJsqz3ZjiAtN6Ry0RL0tUGdjZ5Aj1GxfYzZEflg5AW58nXg1 IeAt0pMu10Y32K0Ke8iKg5/Gf1ZUX0PiFU8HGRG+/OZmBXl8LG759N/m7uv829zuUmfX MQ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=WvyTlJTIu7zC1fXLOB1Ftz9j/qeCch0U19wWzL4N0Cw=; b=JsqVmaGzlAm/eKXq0VJddbCmnmroZ6LS9tFoo9rbFLqkfsSrDKvjLuwpPkZejB0NM4 WjOdjfRaiIhx25tdXTzgdGOZxr+FvDU2UOiiuRVLtyIows78rw1ZWtmi5a4COL3vBNfp EBffepXdita6vyh8hn0EI5Y3QcVxJT2OgdEfizc033dIZ3sVYcDhp3/ldWN49hzkLJC4 VYcvPtp133/Ms63eahcWilA5zRcdvE3Wd+1pYvqW7vkaec0Ba3Nrd0T3Uad3XlUmbn+8 a5i/UltwEDsTU/YEGrI1ucGVUG81PsGY9u0fQ52JxOPZuDG0cHJcYGw0PpLLrWmBQydf rmXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8si596408pgq.203.2018.01.24.13.22.16; Wed, 24 Jan 2018 13:22:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932702AbeAXVVs (ORCPT + 99 others); Wed, 24 Jan 2018 16:21:48 -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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.16.1