Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7124245rwl; Wed, 22 Mar 2023 22:45:46 -0700 (PDT) X-Google-Smtp-Source: AK7set/TFyrpRpFHKfmdVLrqKC7FqS2+zEuBhasn942uTgB51xUEyL5QqcYjp5g1QuA6HeKSiCfJ X-Received: by 2002:a17:903:210b:b0:1a0:4859:19ea with SMTP id o11-20020a170903210b00b001a0485919eamr4341500ple.39.1679550346574; Wed, 22 Mar 2023 22:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679550346; cv=none; d=google.com; s=arc-20160816; b=GciCzylb2iAO5vkp3VSTO7qOwYv6b2dpG2ZaS8p1TW/+SOe0h+7jjTroAlV234D267 iq6MD8Nur4zEe/8vNTYFH6qsb5q2MO1BAnkr8cv9+uGYufWocILuNEkG5FCTSSOj3KpG 3cE7y33s/1UEd8PWLNyEIUgtqrpnFkZ331H4LZ5DWsng71pUmxUzEvGdK4gk6Q861KHr lN5gLNqMOOXdBshRbukCZaDQREXAbmJPgJI6ncYIPwa3kQz9gHUQqmfo7+Ms5ZF+WOwW hMuiiWW01QfoJhsplnz2kxTUrcoSDIR4DZQCMVR84O8kcduDv9T8WB0c+76oxZRLUY2Q Bodg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=CYOW5SwSipHHV+X7QbtEojz+lV7M6qJUJrxoVMPpv3Q=; b=ozKcsHVTxER8z7doKahadjQ3h03GAp8QN7A+1AYmnJR8/I+nNuxwvZO3M3M9kPJL1j eNkviGd6SSkGGe8+lgrX5KgOpGU8mKOQX/EYYRbYGVh/OiUhws1pFbPuWcMkT+2VbBlp +MPc54QodX134SQmoxmhUy7/SQ+NI2teCDbdnTYa1tmv6Fp0F+t7iXe3oQGos5pYWkrf +czwADGhae5yr2hpO8/ccYQshgXLBMRvBSyd8yPKBF4U/rfUGbOe8OduUCu/eg8ZJbwM Te+e3ukzolYtvRNkMhL6bULX+XZgrbYG+eoKYkPKCO+JGIw987XDw+PNodQDOtUEVCN/ EPZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx14-20020a170903138e00b0019cba5dd485si10139531plb.358.2023.03.22.22.45.34; Wed, 22 Mar 2023 22:45:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229903AbjCWFlG (ORCPT + 99 others); Thu, 23 Mar 2023 01:41:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjCWFlF (ORCPT ); Thu, 23 Mar 2023 01:41:05 -0400 Received: from hust.edu.cn (unknown [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C0CA1F5C2; Wed, 22 Mar 2023 22:41:03 -0700 (PDT) Received: from pride-PowerEdge-R740.. ([172.16.0.254]) (user=lihuya@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 32N5dm9Y015381-32N5dm9Z015381 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Mar 2023 13:39:48 +0800 From: lihuya To: Thinh Nguyen , Greg Kroah-Hartman Cc: dzm91@hust.edu.cn, hust-os-kernel-patches@googlegroups.com, lihuya , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: dwc3: remove dead code in dwc3_otg_get_irq Date: Thu, 23 Mar 2023 13:39:46 +0800 Message-Id: <20230323053946.53094-1-lihuya@hust.edu.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-FEAS-AUTH-USER: lihuya@hust.edu.cn X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org platform_get_irq() only return non-zero irq number on success, or negative error number on failure. There is no need to check the return value of platform_get_irq() to determine the return value of dwc3_otg_get_irq(), removing them to solve this problem. Signed-off-by: lihuya --- drivers/usb/dwc3/drd.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c index 039bf241769a..c2e09700212d 100644 --- a/drivers/usb/dwc3/drd.c +++ b/drivers/usb/dwc3/drd.c @@ -154,11 +154,6 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc) goto out; irq = platform_get_irq(dwc3_pdev, 0); - if (irq > 0) - goto out; - - if (!irq) - irq = -EINVAL; out: return irq; -- 2.34.1