From patchwork Sun Jan 21 18:03:40 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: 10177035 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 7D92E60224 for ; Sun, 21 Jan 2018 18:04:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 697E3201B1 for ; Sun, 21 Jan 2018 18:04:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DF7E205AD; Sun, 21 Jan 2018 18:04:03 +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 0227B201B1 for ; Sun, 21 Jan 2018 18:04:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbeAUSDs (ORCPT ); Sun, 21 Jan 2018 13:03:48 -0500 Received: from mout.web.de ([217.72.192.78]:61983 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbeAUSDr (ORCPT ); Sun, 21 Jan 2018 13:03:47 -0500 Received: from [192.168.1.3] ([77.181.224.251]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MQvkQ-1eEXb400Ug-00UMSr; Sun, 21 Jan 2018 19:03:45 +0100 To: linux-input@vger.kernel.org, Dmitry Torokhov , Wolfram Sang Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: mms114: Delete an error message for a failed memory allocation in mms114_parse_dt() Message-ID: <9e7748dc-76ba-f147-6ee0-d06c160c7aa6@users.sourceforge.net> Date: Sun, 21 Jan 2018 19:03:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:96TO62Bet6PeM98Ce9HIUuNuJMMUBQGRCFjSfwVHmikPby3er1l yiEqQ/REfuDuHMC9I1eXAL7RdgcyF7tZbjCigwkXX4UFLtUyxDywZZcZMxndZfwW3yHCLBW 7X+8n41GcCfWlKTCXO95sqtylgYDpGfA079clUVYjhrrZMkSlN4wCuvsysIYl2YgDOKogti pLICEjAoa6cWJkiMg/VAQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:GKqUBAnvx/k=:ZpZJ4b54lF1wKhBY/gbZJu j0UlCg6mbbHSWyIfz9LOWT4FHFtvnLHJQGGrrwYIY25Rjny3TbAq2FF4jitbUN9R586GzrPLd Y0YZPR6ofP5WoEPrd0zjQxtxDlsVKoVWn6Awz8AGsU1AmAFda1cZA+Jnykz3VgrM1MloV3ZUt GkqL7TrAI+x4in4+o7mzDUd9vqWuKXfklfFQGd+XyH7LrCXchaURcAHJwhUMnCXUECLxNWk0p R2xJJIlGAsDJYm1SZxrOe+CsumrBINwiBONKtgWlFzbC7JioqPAjtD1jIR5zJQPbMb1nPa63W 3D19iCEL8eqiPRh8PfoIQzTbn9GAPR3XsMl4i1NANIinUxTx8MdSH0kgmif4AkOuM8m5n16iQ PbvjtlRKLiFE04/9UWT2ffPTA4YgR3U4uX4o6dmu8TdgYdibs27DfJws5QgPQIn7FU/BnTuAT hXXKRDKtHOXIiJlF0HlRT6kjpL+EdihTihZlDYSK2GcCwjTTqK0jQJIJXBGRGDe7Ozj4RWCxX G9muFSy2ZfVP7iJSDiO9drHyHbRkYCWv6Psf1McnoMB8bFfAs2/SRgI/gmqitYSkLueoo30Hx wXrSV3FttYoQq80oH9sW8tfQCHbudZmCbTpJsKh8rTkfqa9pH8oLkf6k8nOvTvgGD3+NyTnze 0bkw6qvFFfCqIdAdQzAVuHqy+k8++wEECK5YR4ilnV7v7IDCXGKqRCivUarUhl3R9auwwcjmf yh0Wm/6xS+CilHu/Dgo51W+z/6t3zc4tkfgzOfdfoci22Poa+Dej1yIx2Cqwgk66xj2AfSyCY tF4o8G4jTvH9Pgq0wJ+Noith/fUwopCO4x1OSEc8FRGuVQ3jRA= 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: Sun, 21 Jan 2018 18:58:11 +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/touchscreen/mms114.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c index e5eeb6311f7d..b4482a024084 100644 --- a/drivers/input/touchscreen/mms114.c +++ b/drivers/input/touchscreen/mms114.c @@ -386,10 +386,8 @@ static struct mms114_platform_data *mms114_parse_dt(struct device *dev) return NULL; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) { - dev_err(dev, "failed to allocate platform data\n"); + if (!pdata) return NULL; - } if (of_property_read_u32(np, "x-size", &pdata->x_size)) { dev_err(dev, "failed to get x-size property\n");