Received: by 10.223.176.5 with SMTP id f5csp762910wra; Sat, 3 Feb 2018 09:42:44 -0800 (PST) X-Google-Smtp-Source: AH8x224p80ESty9D8DiV6zX/0qkFNq1BXVc+DNfjlsj5WTXGZq0v7p0tmzdyokleh/DBQdV5t+jA X-Received: by 2002:a17:902:8:: with SMTP id 8-v6mr38330172pla.415.1517679764047; Sat, 03 Feb 2018 09:42:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517679764; cv=none; d=google.com; s=arc-20160816; b=SbCMq1nmxjcYHyhyHeGfkZYdDsq6Aaya8+bjNhW6FL51jekrmqO/lM/HAjadCO/fIj 5wRDd8DJdu8isZx/0mg7WAbzIRMlbW24NcrdAIT5Uldn6S0TFKsysrtVcENHM6d/1Czg /IeXL01pRetZ5NN0JKfYbO03QONKrpxHzfKlZTRIrPD0wgCLG8iQmWzO+M6zx6v3hvvu P3OMXgHjwBG2iqOLnrvrUa4SLjIiCgjlqpAlabM6tDlUySppoZUXCqd3YQr5Nk/6iZBy thxdUtDa8z2km2EYxurtNEuv1mTxj3/QeLzT/3CwUFQl9C2o2v9xzBnsRjrWyKlzFFFK ZbPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=rsHWD1iKMs22mTBipxfe4thvKCAukkC9Ym8RR47nezM=; b=ZXC9PUJHtqSI6YeTiP3bHVMz/yhqaPtdx2XOCneZP8o7zQ/ssIW93AwsLFII3+eMkM z9p+FDAwYQxS8uG9nXBHuOP5nE5Q0HT51EXnolaB7MEw1H2kCtgXBApS5knB0jgilEFj NaKhfewzXguglLug8aFfZxKJMcrfgwJIPKxNumyz56H9LgGiZ61hs/w2TZOxY8Jv+/wS gZA/iM5pwsi3Gg+TMHqvo3Qab7nNrW/GuJDL2wngB31mzJfd3gV2IfZJ4fSjWncj8PLr UCmNah/SEm034LzvJUmTQsWLQ0/g49gUQYm1NmjZxi+EKOGI1EqI8KnNRX9iPD3EnBoO E/ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1-v6si1678067plb.453.2018.02.03.09.42.28; Sat, 03 Feb 2018 09:42:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752682AbeBCRmF (ORCPT + 99 others); Sat, 3 Feb 2018 12:42:05 -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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.16.1