From patchwork Tue Jun 2 11:47:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Bin X-Patchwork-Id: 11583651 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C44A5739 for ; Tue, 2 Jun 2020 11:48:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3B51206A2 for ; Tue, 2 Jun 2020 11:48:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PsT7IC8c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3B51206A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=xCFXLe4983HAIPGuG3m/taQKHJePfqk9I2aFJ2HL+Kg=; b=PsT7IC8cMJwVTq JrrJOPkjJ40FBj2RxDpJRxSUma0EG0kq4K3Q6iqR8LZ6nCSH+szSFzhhTFRHlLjgn5X0azGraNHuc rlF+2Ru3rvndzM4JoCs/m/Wzu7aGbcQ4hAEl1QPulzbI0HVII56Nakd/gZTtgMbgPhGc0SQPXKc2g EtUj6GPYzf6DkmsaLlpcozcs4T4KCSvMmJUoLsr1O9jov6Kao35LIGORpiTbJnts892OOHlPF/IFU EX4WtjlfTNEB1WX1lpi1t39TBRJG7NrGNwwKj3k89aRTxsgUKVJHbB0Uz5Cblq4OZrFyiaw8bidVT mqTmwZGNz2l2x/eqGyeg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jg5Ox-0002vz-9g; Tue, 02 Jun 2020 11:48:15 +0000 Received: from cmccmta1.chinamobile.com ([221.176.66.79]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jg5Os-0002uc-EX for linux-arm-kernel@lists.infradead.org; Tue, 02 Jun 2020 11:48:13 +0000 Received: from spf.mail.chinamobile.com (unknown[172.16.121.13]) by rmmx-syy-dmz-app02-12002 (RichMail) with SMTP id 2ee25ed63c50276-78c5b; Tue, 02 Jun 2020 19:47:29 +0800 (CST) X-RM-TRANSID: 2ee25ed63c50276-78c5b X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.25.154.146]) by rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id 2ee75ed63c4e795-21a50; Tue, 02 Jun 2020 19:47:29 +0800 (CST) X-RM-TRANSID: 2ee75ed63c4e795-21a50 From: Tang Bin To: gregkh@linuxfoundation.org, stern@rowland.harvard.edu, kgene@kernel.org, krzk@kernel.org Subject: [PATCH] usb: host: ehci-exynos: Fix error check in exynos_ehci_probe() Date: Tue, 2 Jun 2020 19:47:08 +0800 Message-Id: <20200602114708.28620-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200602_044811_164327_1D023632 X-CRM114-Status: UNSURE ( 9.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [221.176.66.79 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Tang Bin , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Zhang Shengju , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in exynos_ehci_probe(). And when get irq failed, the function platform_get_irq() logs an error message, so remove redundant message here. Fixes: 1bcc5aa87f04 ("USB: Add initial S5P EHCI driver") Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin --- drivers/usb/host/ehci-exynos.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index a4e9abcbd..1a9b7572e 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -203,9 +203,8 @@ static int exynos_ehci_probe(struct platform_device *pdev) hcd->rsrc_len = resource_size(res); irq = platform_get_irq(pdev, 0); - if (!irq) { - dev_err(&pdev->dev, "Failed to get IRQ\n"); - err = -ENODEV; + if (irq < 0) { + err = irq; goto fail_io; }