From patchwork Sat Jan 27 14:59:18 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: 10187521 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 F3C2860385 for ; Sat, 27 Jan 2018 14:59:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E716F28BE6 for ; Sat, 27 Jan 2018 14:59:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB6BD28BF4; Sat, 27 Jan 2018 14:59:23 +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 7B8D628BE6 for ; Sat, 27 Jan 2018 14:59:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752996AbeA0O7W (ORCPT ); Sat, 27 Jan 2018 09:59:22 -0500 Received: from mout.web.de ([212.227.17.11]:53010 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752911AbeA0O7V (ORCPT ); Sat, 27 Jan 2018 09:59:21 -0500 Received: from [192.168.1.2] ([78.49.117.84]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LkPjj-1fD8k13X4d-00cOFc; Sat, 27 Jan 2018 15:59:18 +0100 Subject: [PATCH 1/2] Input: turbografx: Delete an error message for a failed memory allocation in tgfx_attach() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov , Geliang Tang , Kees Cook Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <0255c4a7-fff6-f427-e8a1-951b44ef3f54@users.sourceforge.net> Date: Sat, 27 Jan 2018 15:59:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:B0yJQndb/km4VG9BtFLSBR+Y0kQCmhBgaQOm/QFGp53iVfSq/AJ 2yPXMtjgfkbl43Kjwha4n8F+IXxQQNRpZ3T2LnsgnkPua1HPFxylyXozmkJ24jwWtl/0p9b /GPaEIpTgdarKtc0sHfNhMTcU26lnhWs1sMwbZby2GHgU6I+kTvE2l3SUC4ZixJHpmod2Hb Qo/5v+ICb67wAm17mD6Nw== X-UI-Out-Filterresults: notjunk:1; V01:K0:UY2dvVjQjnk=:1hQuQBIkNq/+swuZgDOL7n nzpRbSprCRCytSGyWQhbH7n+MrdDBsZq5aBTbLZRJ+LMegw2IA5vCpvwah9+1Dpxx8COVMkul oajhuLQHYCr0ihef7LbdsmwPyZjUS0CPvOUkjcED+1qccoac3ZPHkAymXbSNqi2nF0n1nyG0J qUcKck4USNEdiGerxEDeQCAHNHZGFGhm7qPVkJgO9iU8aImLGCg63jh3ixG9l1sdDaVjCDQSq KEAtlpzSzNFVgfnqnfHj3LxmMXxIi7mlonuiuQ5xLnLCdsrmP0Qu4n1fZrZ4STl6L69nnkdZH NQaxnqHQpw4WlvP+TB+wOMA0QlfBbU6wQn82kdLrTPgvpzgT6moqnY6EH9gsaDpaXX90fHT5e ZbdZgG22JtPJKqFEOBxcFc3gSR98ZdojLKtpWBV4OZiY7FvsItwGY6f8w+U6CKY4sBhB/8uCc WB4b4YTZ17jbL1ZZNnqiKZmiD1LjEZgqqs9cUOxfKCJKIL2nKBJWCW73m5f7gEbpWhGixieJH t/4LkGlRDlAvYry9fQLimnNbwyBvBCsJ30W8U9ZmI+zs4ibyp8M+pDoG/48TC4iCs6Le0aQzq LD+V1F1G2Fnbzv7VI+YAGFPncL9VHa9oJ42D9TcZPEjluz4M598niE0bLFPgOr1QyiBp0X4uv dWDVKC+XVKR1mRS2V5MYyLBL76SaLmCP4kSLEnVA/qyTtrl7QUUNnYewkWfTZGr2PVU1EKc1i KxfbTFfOr4bdyvhkFqRqOJJkVaMkQG5fAVPTH3wZwo0gnvjrveYRQV6g5RxIjs1lJgyw/8Sho 50yYVFlE8UxuukvjRqOErRvZmTSEd4WGy4tO7P0+FoPq76bfHM= 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: Sat, 27 Jan 2018 15:43:38 +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/joystick/turbografx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c index e2685753e460..454d4c032292 100644 --- a/drivers/input/joystick/turbografx.c +++ b/drivers/input/joystick/turbografx.c @@ -192,10 +192,8 @@ static void tgfx_attach(struct parport *pp) } tgfx = kzalloc(sizeof(struct tgfx), GFP_KERNEL); - if (!tgfx) { - printk(KERN_ERR "turbografx.c: Not enough memory\n"); + if (!tgfx) goto err_unreg_pardev; - } mutex_init(&tgfx->sem); tgfx->pd = pd;