Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp45408imu; Thu, 8 Nov 2018 14:29:27 -0800 (PST) X-Google-Smtp-Source: AJdET5dstndASsjQzDY28LHIexJLjDfVnLeIwdUZRkSUno9L2M1iLG1BxkdrSew3BU8G3Sxw90go X-Received: by 2002:a17:902:76cc:: with SMTP id j12-v6mr6414002plt.339.1541716167351; Thu, 08 Nov 2018 14:29:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716167; cv=none; d=google.com; s=arc-20160816; b=x/TuwPo8TxT/balQG0GKZqKJ5UeBf7xkoUduW+4ckRPpJfM0tNlnelyC/3M/TFbjsT ++vJER8NJU9x9lN+sC+p7chASu5K6NcKWD10pk1aAc+oPZA1qH3ZV6oFHDdsAeC7ix6S LbcMdSBXlISv++A69NN366+I1DQ4EwJ/MsKFTA9IuYc5HYGrVhVm0Z+TqSNWwD0V9xdS RgQ3qwHf2blHCb8tZOoqEnc15Y/ypeIVb0mxsIEXz47AKun3po5NY4HWQIcUu+Of0KsC GXuwSahtRnQ/AU45ATAADXIFFX0fXh4eyi11LfOUNYIm3dnl8LLTOG4nwMHoMQfgjSSk LdyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sJ6QjpTy2JPo6xrkOpxVjC7/Ni0ZMH1V6SITS9XsOhM=; b=pd1d62muHVLJQK5DpgC8yJKlVzGyQHVOuyYX+QKcKn/9lxt+tu5FBQxDgqvFM/bGE/ MA6JZbUKZwR0jMIx/WSr2HfFNcmUHy2H1RAmFbS9+T0KhvlKPhPf6slueXdXHk9gd88u AhBNqi+ejb1BTl1c9UqX96cVAvOb/+XltM8ECwkjDi0L738zgjn/Ai5yyE7arcx8+6o2 eMJFHtEqpYFpHS2XX0JPJpOsHUQwNpNtSa4dQby2L8P1DNxL3Hh7Tjl3VLMwRIXMdkjZ M42IAZW0mKbyRG95UOyS5Al3nvWBjufXG0WrMe3oadn+Mt8+z0Gu+QLKWSn/C86rZfC8 OH2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pm4tpKLE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m70-v6si5514771pfj.48.2018.11.08.14.29.12; Thu, 08 Nov 2018 14:29:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pm4tpKLE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730863AbeKIHix (ORCPT + 99 others); Fri, 9 Nov 2018 02:38:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:58382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728539AbeKIHiw (ORCPT ); Fri, 9 Nov 2018 02:38:52 -0500 Received: from localhost (unknown [208.72.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A4E1520892; Thu, 8 Nov 2018 22:01:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714483; bh=qyu56eSZm4RemuX6wc6rA6FFrE4G7XPLugOTYoCvkvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pm4tpKLEi5UB8sqrugsOiYanhqld5in0I69cHUIya7UMD6f8WBMpEACy495j0crtm bV6gWUGTwuAwVgtAAe0j7ACufrR3PWt1kLgFG+fO7Cqg9tshvgc8a2Xneqsudmy67X QRY44QJJAlGhb+B9fqI66VsTjJpeNaAe9Lv1/TEo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Alan Stern , Sasha Levin Subject: [PATCH 4.4 071/114] usb: ehci-omap: fix error return code in ehci_hcd_omap_probe() Date: Thu, 8 Nov 2018 13:51:26 -0800 Message-Id: <20181108215107.462208200@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 99dbff202e28ad1dadf55b058bcae7908678e963 ] platform_get_irq() returns an error code, but the ehci-omap driver ignores it and always returns -ENODEV. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Also, notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/host/ehci-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index a24720beb39d..cccde8217f28 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -130,8 +130,8 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { - dev_err(dev, "EHCI irq failed\n"); - return -ENODEV; + dev_err(dev, "EHCI irq failed: %d\n", irq); + return irq; } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- 2.17.1