From patchwork Sat Feb 3 17:41:49 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: 10198635 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 466EE603ED for ; Sat, 3 Feb 2018 17:42:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5494D28F7B for ; Sat, 3 Feb 2018 17:42:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48F2228FE3; Sat, 3 Feb 2018 17:42:07 +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 9B0B128F7B for ; Sat, 3 Feb 2018 17:42:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752465AbeBCRl6 (ORCPT ); Sat, 3 Feb 2018 12:41:58 -0500 Received: from mout.web.de ([217.72.192.78]:57456 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbeBCRl5 (ORCPT ); Sat, 3 Feb 2018 12:41:57 -0500 Received: from [192.168.1.2] ([77.181.226.140]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MSads-1eGQGI27gi-00RV4b; Sat, 03 Feb 2018 18:41:50 +0100 Subject: [PATCH 5/6] hid-prodikeys: Combine two condition checks into one statement in pcmidi_send_note() From: SF Markus Elfring To: linux-input@vger.kernel.org, Benjamin Tissoires , Jiri Kosina Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <9a241420-d47e-97ae-3d95-4fd59eda92ad@users.sourceforge.net> Date: Sat, 3 Feb 2018 18:41:49 +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-US X-Provags-ID: V03:K0:XVcNeYMQQ13LNTz+XY9Bhk3S0ITZ/syDsDJysgF7/4cZM/G03yu UNQvgYl8Bi7zKxUjEOUQr0dbEtMHZdl9Mru6vF4jNLda4E/9SoxYegJxSVlX8w9SNQ8YUOe eBshbOCJkAnXByfv5k3u09YVQc0RpG1kc+vqFczMM+3UyI067PkEAVtdH6UfhwVoganlDb/ CkMAdw7K8zf0Yam3UHcpg== X-UI-Out-Filterresults: notjunk:1; V01:K0:JVdffu13z9s=:sCdEbbAnnXqj4JbG7gHf7h EMcXM1LslrtFpcB7b0Kb0dlHwxMoOxW3YoyUiDpwMN/0LRkZMlK7V6+eFSF032sgyq9Dr5Nnm 06JpXJaR7eGkFOQ5avGyboqZACSTc4f/br0zBfl4kMUKSXDZiDYzbEBeThEyPatPCEBdzNRll GxuDz9uU5pdANnKkD27mefdGZhcYPrB9fsz/ocbLGc1QjThelz6q2Sxux8DGZWZTI9+65oIzL X6QiYkFh4/NNxFzdoluB53epLKgNEkCvERSgijENcmN68gyi9jBgvsg2zKZm2GiCGwZ4gyajC tScBTnE+85Sf983BXyJ3whF9Ul/gJFjDDNF6SJcqCbPJ6IYxCGl+CDHLbMan1CbgBOCWRnDW0 dekgzi2O9JoQvaa5GEeoKSkw45iJyHm2jNC0r7Q8T8Gdp0QdNVxkksyy+MwRve8a8SBDXZPVL zBWIUeweM7KUHJeSJ6EDvbvL/euEPfk8p04YJnOUilA48jVm4NctzCtPm381mBeQGkzCsmqQt 1zL14YBxePp8dRbYvmShio6O8hPz7obcevXaiQL0rrI/fLJXyuZFsPK6GTjoao+jCzA5VqNwY j/z2arQSgK+NRjWjWa/icejzhX09o+jOpIvP7Y5Z9BpEPptlWgIPkNZruMj1nW1+zEwL6D2Vt zlKFiJZxpsJ1mpRXO2d44zKPIq774n6aImNNXEQJ9qew4+vdAF62Z4WiPi/YGto762vbeDqgy hb8edi7ZSsMmr/nGGNbuHC7njsPteY+ghX2qlKv8tiFKwjuePLnaohLjTNBqPO0nT0c6EAPPz eZCwGsH7Wslg6rcNiktXBimYEKn3RSCEqihqPT7GcM0e0ffoyw= 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, 3 Feb 2018 18:00:06 +0100 The same label was used by goto statements after two condition checks. Thus use a single statement instead. Signed-off-by: Markus Elfring --- drivers/hid/hid-prodikeys.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index c9eae92ad429..1c62dddedd40 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c @@ -226,9 +226,8 @@ static void pcmidi_send_note(struct pcmidi_snd *pm, spin_lock_irqsave(&pm->rawmidi_in_lock, flags); - if (!pm->in_substream) - goto drop_note; - if (!test_bit(pm->in_substream->number, &pm->in_triggered)) + if (!pm->in_substream || + !test_bit(pm->in_substream->number, &pm->in_triggered)) goto drop_note; snd_rawmidi_receive(pm->in_substream, buffer, 3);