From patchwork Thu Mar 23 09:53:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mingxuan Xiang X-Patchwork-Id: 666488 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54DA5C6FD1C for ; Thu, 23 Mar 2023 09:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230435AbjCWJ4C (ORCPT ); Thu, 23 Mar 2023 05:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229976AbjCWJzb (ORCPT ); Thu, 23 Mar 2023 05:55:31 -0400 Received: from hust.edu.cn (unknown [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A429614215; Thu, 23 Mar 2023 02:54:06 -0700 (PDT) Received: from localhost.localdomain ([172.16.0.254]) (user=mx_xiang@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 32N9rDdw000357-32N9rDdx000357 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Mar 2023 17:53:17 +0800 From: Mingxuan Xiang To: Thinh Nguyen , Greg Kroah-Hartman Cc: hust-os-kernel-patches@googlegroups.com, Dongliang Mu , Mingxuan Xiang , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Date: Thu, 23 Mar 2023 17:53:10 +0800 Message-Id: <20230323095311.1266655-1-mx_xiang@hust.edu.cn> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-FEAS-AUTH-USER: mx_xiang@hust.edu.cn Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org platform_get_irq() no longer returns 0, so there is no need to check whether the return value is 0. Signed-off-by: Mingxuan Xiang --- v1->v2: remove redundant goto drivers/usb/dwc3/host.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index f6f13e7f1ba1..ca1e8294e835 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -54,12 +54,8 @@ static int dwc3_host_get_irq(struct dwc3 *dwc) irq = platform_get_irq(dwc3_pdev, 0); if (irq > 0) { dwc3_host_fill_xhci_irq_res(dwc, irq, NULL); - goto out; } - if (!irq) - irq = -EINVAL; - out: return irq; }