From patchwork Thu Jan 25 21:20:07 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: 10184811 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 4F29D60383 for ; Thu, 25 Jan 2018 21:20:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4043F28AB8 for ; Thu, 25 Jan 2018 21:20:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 346F328B13; Thu, 25 Jan 2018 21:20:27 +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 3335B28AB8 for ; Thu, 25 Jan 2018 21:20:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751232AbeAYVUM (ORCPT ); Thu, 25 Jan 2018 16:20:12 -0500 Received: from mout.web.de ([212.227.15.4]:62770 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbeAYVUL (ORCPT ); Thu, 25 Jan 2018 16:20:11 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LfzcB-1f7K8x2rWt-00pa5f; Thu, 25 Jan 2018 22:20:08 +0100 To: linux-input@vger.kernel.org, Arvind Yadav , Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] Input: pxa27x_keypad: Delete an error message for a failed memory allocation Message-ID: <6162ffdd-7375-a7c7-fafd-0b167f874a0e@users.sourceforge.net> Date: Thu, 25 Jan 2018 22:20:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:wc/wYyHZrHQS1rGNZ7xYu2YAI2k2dxcyPJP8S914W2hr7nEIl0G a54SUvwKEYnNKy7DhdEO+5FGJrfSGk0e1S2vnds1zjmHd7YOwi7l0UYrlkhlFZu8IS4ZALB Umy0iyzb+vDjJm9SzI79r7avtdY2X8/MYUb07RTod1PqJ0ZdIdXCDeY0I/+cxfN9qwDYAto nL69p6Lw2TmqUrWQTeA8g== X-UI-Out-Filterresults: notjunk:1; V01:K0:IrcqDwXnKRQ=:wbiLXmTf2F6QcS3TIwJus0 4Tun76J56yx8fhw0ZT+StVQd+zhMiO8zeKUhUhmOsoXW75DFS5Ucyzqx5AX0Khj6gCabgUJhl SCO4QoOExZCoAhzDL5B5zCgz/lILCv0hZlcTYOTiL+dUMK/YuOFHs0E0riHvOwH9k2fB5J2wN 4LcxgLUEmPNakgvqLg/koVFKPba20kVbNu0h3v1iDzBKl7B/d/egRJXyhat/2YYVOOx/lCIYO L9tP+SHEsdJB3zLBFZpPg6iTQ4Zi2B+S+ho1GH0xP+yFhkkw0AAnAvWjgfelaDIYxk6C4/S6D w8vQkPZ6A6ga/MiKj8v6m6qP1jSFgR2ifg25KK7Pb3lr4bisw9wrPHNFPZS0EONL9HWBzmYH/ YPs3Ipns9uGLMIgoASnzlzTYtWDjejpLM9w6sMVU6pgH/+S1Fcc2zJSjO8VDjnOy82VAwKQFa 3lybUO0/lMhJe1RhKFWinEmHlcMvC9AlXzF+svCagsf4BPO3YDAjkJSxPQS6CETal/mPJCUIG eIaDbFwOAn+qocxVjYDvU1FQJpAEqdugb6OGEY5PSLbvZ7lr1/YFwVpmzCZv6/q8gqljLOQdC h6ThB3N7E4sYGtfaKthAq+qsivt27dEfyAYawP6jeNAXcLSn/9YE6MrgCGF4URZTgo1Ykp1Xo VD4Uy2EITt+V4xXqesnpVT4yAASoH10iHUfIE5dAzBI8HxYhYK57WiKPz10G5TBBF7E8hZq4d S6ABiZ7oTn7WE5w/kjIyt8ZJg3Nrq4lZzhOFnSkmhA9dgNGAVNvHT+GBhMwH+L6qlmskD6k2M D0xSMU3Fs04ClYFW0+9tgY3UgxNu702aT5wy7ySluAmrGao5u0= 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: Thu, 25 Jan 2018 22:15:27 +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/keyboard/pxa27x_keypad.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index d0bdaeadf86d..bafd075344e2 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c @@ -290,10 +290,8 @@ static int pxa27x_keypad_build_keycode_from_dt(struct pxa27x_keypad *keypad) int error; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) { - dev_err(dev, "failed to allocate memory for pdata\n"); + if (!pdata) return -ENOMEM; - } error = pxa27x_keypad_matrix_key_parse_dt(keypad, pdata); if (error) {