From patchwork Fri Nov 3 09:20:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 10039709 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 8FF896032D for ; Fri, 3 Nov 2017 09:23:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8360328D74 for ; Fri, 3 Nov 2017 09:23:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76AEC29571; Fri, 3 Nov 2017 09:23:20 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1775128D74 for ; Fri, 3 Nov 2017 09:23:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAY9l-0002Vp-Pj; Fri, 03 Nov 2017 09:20:53 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAY9k-0002Vj-Qy for xen-devel@lists.xenproject.org; Fri, 03 Nov 2017 09:20:52 +0000 Received: from [193.109.254.147] by server-9.bemta-6.messagelabs.com id 16/5B-30115-4F43CF95; Fri, 03 Nov 2017 09:20:52 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRWlGSWpSXmKPExsUSvTeyQPezyZ9 Ig8Nn1S2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozbFwoKTrJXvDpxkrGB8RBbFyMnh5BAI5PE jdWVIDabgLbE/mctYHERgWKJ9o69jCA2s4CTxJ+vHawgtrCAo8SHfXdYQGwWAVWJlrW9YDW8A rYSe76vYAexJQTkJc49uM0MEReUODnzCVA9B9AcTYn1u/QhRspLNG+dzTyBkXsWkqpZCFWzkF QtYGRexahRnFpUllqka2iql1SUmZ5RkpuYmaNraGCml5taXJyYnpqTmFSsl5yfu4kRGB4MQLC D8duygEOMkhxMSqK8dzf+ihTiS8pPqcxILM6ILyrNSS0+xCjDwaEkwasODDchwaLU9NSKtMwc YKDCpCU4eJREeHuNgdK8xQWJucWZ6RCpU4z2HMc2Xf7DxHHj4XUg2XHzLpB8NvN1A7MQS15+X qqUOO9LkDYBkLaM0jy4obDIusQoKyXMywh0phBPQWpRbmYJqvwrRnEORiVh3ssgU3gy80rgdr 8COosJ6KzZHGBnlSQipKQaGDkuv7rEe+qLVdoFYc5lTUeZXizf51irPL1pnpfRAi8vsU7jVVn 8ahX7/fR/ruhhCLix+2ueW9S3VZrhl86nNM6ezBoU99DJN8N+y8pWzjkSn47drtj9NlF9T+m3 1cxdRiUmug7+i07tyVjobn9xcfMC/QOVW8sWtKrVu+85vV/Ijde8Y4anrxJLcUaioRZzUXEiA K+3QJOnAgAA X-Env-Sender: colin.king@canonical.com X-Msg-Ref: server-12.tower-27.messagelabs.com!1509700851!113296677!1 X-Originating-IP: [91.189.89.112] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 47059 invoked from network); 3 Nov 2017 09:20:51 -0000 Received: from youngberry.canonical.com (HELO youngberry.canonical.com) (91.189.89.112) by server-12.tower-27.messagelabs.com with AES256-SHA encrypted SMTP; 3 Nov 2017 09:20:51 -0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1eAY9g-0001my-49; Fri, 03 Nov 2017 09:20:48 +0000 From: Colin King To: Boris Ostrovsky , Juergen Gross , xen-devel@lists.xenproject.org Date: Fri, 3 Nov 2017 09:20:47 +0000 Message-Id: <20171103092047.28421-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Xen-devel] [PATCH] xen/pvcalls: remove redundant check for irq >= 0 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King This is a moot point, but irq is always less than zero at the label out_error, so the check for irq >= 0 is redundant and can be removed. Detected by CoverityScan, CID#1460371 ("Logically dead code") Fixes: cb1c7d9bbc87 ("xen/pvcalls: implement connect command") Signed-off-by: Colin Ian King Reviewed-by: Juergen Gross --- drivers/xen/pvcalls-front.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c index de8a470351a5..b08569998046 100644 --- a/drivers/xen/pvcalls-front.c +++ b/drivers/xen/pvcalls-front.c @@ -351,9 +351,7 @@ static int create_active(struct sock_mapping *map, int *evtchn) return 0; out_error: - if (irq >= 0) - unbind_from_irqhandler(irq, map); - else if (*evtchn >= 0) + if (*evtchn >= 0) xenbus_free_evtchn(pvcalls_front_dev, *evtchn); kfree(map->active.data.in); kfree(map->active.ring);