From patchwork Thu Jan 25 18:54:47 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: 10184661 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 4137260388 for ; Thu, 25 Jan 2018 18:55:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F0461FFB1 for ; Thu, 25 Jan 2018 18:55:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2162A2871B; Thu, 25 Jan 2018 18:55:02 +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 C5EBE1FFB1 for ; Thu, 25 Jan 2018 18:55:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751211AbeAYSzA (ORCPT ); Thu, 25 Jan 2018 13:55:00 -0500 Received: from mout.web.de ([212.227.15.4]:49611 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbeAYSy7 (ORCPT ); Thu, 25 Jan 2018 13:54:59 -0500 Received: from [192.168.1.2] ([92.227.186.52]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LoYJu-1fFnAx1Kx8-00gXXt; Thu, 25 Jan 2018 19:54:49 +0100 Subject: [PATCH 3/3] Input: ims-pcu: Delete an unnecessary variable assignment in ims_pcu_setup_gamepad() From: SF Markus Elfring To: linux-input@vger.kernel.org, Arvind Yadav , Dmitry Torokhov , Joe Perches , Johan Hovold , Zhen Lei Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <903a941e-a562-0456-da6e-9a801254c853@users.sourceforge.net> Date: Thu, 25 Jan 2018 19:54:47 +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:OAkNhr6gHUdjWEEJkKXBAiwaymueRKQW49mqY9E2GXVcR6j3UKF GSqH01njUuv08YR/XHDCRl8AArvZDAGlFZ/5hyhz8K7xiHYMRttr9pLzcPKbc2eKhAvR6aW h1tn7IwrwCOFltERGrxZV7mzDZQJ9QfCUQcKlnAgJsDMxFny3z+gdO/siMWOqt8KoBpqnhf mWISHwrbssXBCFBjHsWhg== X-UI-Out-Filterresults: notjunk:1; V01:K0:ii9t0uS8Urw=:y4EduzAyb5wO5/JUp3hDFH VfnfBaxEIFpU7DUSyghN0XJw8RwZZYSUXt4mYWOb++DiNw4q9qzEsrE2wkQMCiaHrj6bwADLd Nt1KH6cGkONOYA7oeiP60mgttGeyjEY6mOiSOlYJAbDTCccx0A9yXYNp3t6n+RVVZZOZDNN0P Zlm3P7WNA1gsCuIL4+ioGYQ+qiZD517H2YdvzmK/6sotS4cvaA52z/qEIZxSuN7Aj4Vt9HxHt jZiezAibuF6A3ZKr+X4psUmxEIhHHl06clNT6evePfd6AJgH8E3+WR9hZePT6l1LMkr+F5Ki4 tRVQIOb5ypmkDXQ2tRqWJ/0KX1NSIcZDNr1utGvBGrdW6hFEEorDNqusmvLtyUS2nthQqeXEc evP9fTelIAIs22wt5eLULxTdgy/ePs2/shV9O2kVfgVm+cf2R8bfq/6TwMb2mcY4rJbcN70xO Z6cvBYlGFh5EyPUhgBJHkpyYfbzC0XDClu6SgQ/TGb0HdlOmTuuoMXYmqcE0WcodEg81ZAGfe hV8MmJjgNgDwQpPvcG5vQP4nHahLVnlWiIcrY7U8J7xHUrOoTkpnI7y/xhav3JZ6h1ERnov7S s32OOHf34HKHANNlg8P2Yjh0cIcITF4KV6a4rhnTBEWA2uXZxedfRhWY8HkRgfSDmPzw23Xc5 Tgu92opVkDjSvNYbogrX1D01P0UflFyAusxubr3wTQfq8pSx6R2KK0EMLqjwxDfvJyjAmnHUy WHxdwZOmsO9bIG8pp9rfxGhIQioLoXcjTHluH6InOIjvhA6CWupzGKEMU4xLft/kg5/2q+Al+ HgRxoiLzSzAvYQ/hlvzWtBiSgFOrDtR4hvBJioNsKl5rXCZMaA= 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 19:37:34 +0100 An error code was assigned to a local variable in an if branch. This value was not read again before it was used by a return statement as a constant value at the end of this function. Thus remove such an unneeded assignment. Signed-off-by: Markus Elfring --- drivers/input/misc/ims-pcu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index d7778b273151..aa1bb284c714 100644 --- a/drivers/input/misc/ims-pcu.c +++ b/drivers/input/misc/ims-pcu.c @@ -295,7 +295,6 @@ static int ims_pcu_setup_gamepad(struct ims_pcu *pcu) if (!gamepad || !input) { dev_err(pcu->dev, "Not enough memory for gamepad device\n"); - error = -ENOMEM; goto err_free_mem; }