Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1273001pxx; Tue, 27 Oct 2020 12:23:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy472ATPlSuMSBiztkURZiLgWEbshaKR8FBSX1gVsH0nRkqjdLLzbOEi47xNPT2y/Kv9c+A X-Received: by 2002:a17:906:6805:: with SMTP id k5mr4153335ejr.79.1603826609509; Tue, 27 Oct 2020 12:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603826609; cv=none; d=google.com; s=arc-20160816; b=duJMXGK5LcvE9inVtKjcmDw27eF9lzPUYdG32+1N/RVtCZ2H8nm0hYERlPapGAa9J/ ZvLXs9h3lWIdFU2/5LMQso6UOi2rEwmt8syxowDGgWhiae5NnrIhOkCb00NM/nihu9EM 7f4/e+eDlsmijF84bUEMKsl+8/U5+Oyk0WkNLppgFo+nboD+/1INUrud+MUqM/w9aJ4E qNZhw3ZCFRSwY9mtWoi18p0Sfy5X7NSR4DCzpplm/EECbI01l84OsvTIWZRBww9j2Zal HeJxPTKLKziTszj6MYHRK2gA9+N9fePbRSh4IkcbS3mCYfyh2TGYXHs0pwSBOhyDN2Go bJtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=RIABBZT2xTLDCJSEthHum7nnOY+7zG3t1hcY5wVwpms=; b=QHXyi62IhsN+1qgpNF3jB7yHojLA1hzax5GNsljdErxDYSxEx8IXQ5ZcYCCYb1tCwx FavfKco4dgOefIzQhuux9ALUS/QaDo+HqA4SBVZ/eW8qE+XgTX9P9zKcFtBoF5uSmjC+ 5jyHRYQztLKfGhVzXdI8BEK+auOAGh0wxJXM1im1jkR84S2hDu33hPz0aP7HHSsnNFfP G/AJdRq0ZvHj/e6u/oAJ6lQn4dVRRHu7w54gg4VeQR0N8EZ0SHJ57DPE7DSQX6UTqVzT VIisQXkAvoSkmWGVccehvpoLkeOKBr2Ani05iLmScEOkyn/WdquCPl8Po04OwD/xYRrA KHZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qn23si1671011ejb.46.2020.10.27.12.22.54; Tue, 27 Oct 2020 12:23:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503683AbgJ0BNf (ORCPT + 99 others); Mon, 26 Oct 2020 21:13:35 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:26302 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410119AbgJ0BNf (ORCPT ); Mon, 26 Oct 2020 21:13:35 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.9]) by rmmx-syy-dmz-app01-12001 (RichMail) with SMTP id 2ee15f97741f12b-eaab3; Tue, 27 Oct 2020 09:13:03 +0800 (CST) X-RM-TRANSID: 2ee15f97741f12b-eaab3 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from [192.168.21.77] (unknown[10.42.68.12]) by rmsmtp-syy-appsvr05-12005 (RichMail) with SMTP id 2ee55f97740b406-43814; Tue, 27 Oct 2020 09:13:02 +0800 (CST) X-RM-TRANSID: 2ee55f97740b406-43814 Subject: Re: [PATCH] usb: host: ehci-tegra: Fix error handling integra_ehci_probe() To: Alan Stern Cc: gregkh@linuxfoundation.org, thierry.reding@gmail.com, jonathanh@nvidia.com, linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201026090657.49988-1-tangbin@cmss.chinamobile.com> <20201026150538.GA1192191@rowland.harvard.edu> From: Tang Bin Message-ID: Date: Tue, 27 Oct 2020 09:12:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20201026150538.GA1192191@rowland.harvard.edu> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/10/26 23:05, Alan Stern ะด??: > On Mon, Oct 26, 2020 at 05:06:57PM +0800, Tang Bin wrote: >> If the function platform_get_irq() failed, the negative value >> returned will not be detected here. So fix error handling in >> tegra_ehci_probe(). >> >> Fixes: 79ad3b5add4a ("usb: host: Add EHCI driver for NVIDIA Tegra SoCs") >> Signed-off-by: Tang Bin >> --- >> drivers/usb/host/ehci-tegra.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c >> index 75a075daf..7b0efaf15 100644 >> --- a/drivers/usb/host/ehci-tegra.c >> +++ b/drivers/usb/host/ehci-tegra.c >> @@ -479,9 +479,9 @@ static int tegra_ehci_probe(struct platform_device *pdev) >> u_phy->otg->host = hcd_to_bus(hcd); >> >> irq = platform_get_irq(pdev, 0); >> - if (!irq) { >> - err = -ENODEV; >> - goto cleanup_phy; >> + if (irq < 0) { >> + err = irq; >> + goto cleanup_phy; >> } >> >> otg_set_host(u_phy->otg, &hcd->self); > Acked-by: Alan Stern > > The "if (!irq)" statement occurs at least one other driver in this > directory. Would you like to submit a patch for ehci-xilinx-of.c as > well? OK, I will check this file out. Thanks! Tang Bin