Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp48119imu; Thu, 8 Nov 2018 14:32:29 -0800 (PST) X-Google-Smtp-Source: AJdET5dSdDkPSCeGSkY3oBbkAv+X6HQP7AGyEhMY6KKHzb5ylGk9UKOE2zcv4+b/DMtroKTuFsKD X-Received: by 2002:a17:902:33c1:: with SMTP id b59-v6mr6196627plc.71.1541716349093; Thu, 08 Nov 2018 14:32:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716349; cv=none; d=google.com; s=arc-20160816; b=tWu8Jj//wIOhM4JVUACwWIppS0wmPYTkVJ49fsVE+QFUHa6HfmrH9pPaZb3/cx3NOV 9YvkaHMxuxH06IX26LUtIuOOHDT+u1bvMTSkwvKGTNuPurijFQZGnUBDBk4QoBENqzjd 5QFkDkJPDVXfC3C42nCSkBdGjRYbtqsLhTchGtshZuSTgbIFdyrIlR3MY67XhFCizFSs GTcRstDAG5sVi4STrlCzOVXL+ABO+HJFW0lXsxIkUSzG++7XojQJYog4j2AlWLziEJXh cspLToG7l8TzDQEVG7YtdUktd1LN+Ml0b3hNFZBqCiFiXAEcXdk+6uPfqOwAeaANYe1/ fzsA== 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=6Pw4g4AOgPQyvV1PvtoA47PBWbcz52EUZ1FAdTWSRGo=; b=jEUHqdsiS88z1vHo2WBg3HcibkdviC6xL2zsZNEjdDYeTiWc69N22x0i86s5qdbtMm kDBntlwXn61/yVNzyYetBk4yHP564/uCuPc3bVNUI7HEfxHWqnsZpy2MxBJ+qhiZQO6d uC47wFJb5bnb3axUyX2F+fX7Ji9NHRikJ7+Tn0n79jrPW/JvBmOoWfINPqb83aN5h7zL r+Y7Y7Essxe7LHD7NoIdDzJgrEr84rvbvWztx4/BYkjNyjC61u9RqLemTWUaoJH8zrOf 34aUrM+mMe5NFWzWzRGYpvUhK3PUi53Tqq3UYht1hj63IHpG3M7rLrIBdofQHOwSjQq5 0Svw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c6swDqfS; 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 m20si4758650pgk.323.2018.11.08.14.31.58; Thu, 08 Nov 2018 14:32:29 -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=c6swDqfS; 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 S1729601AbeKIIJS (ORCPT + 99 others); Fri, 9 Nov 2018 03:09:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:56698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729292AbeKIHhz (ORCPT ); Fri, 9 Nov 2018 02:37:55 -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 AAFC12146E; Thu, 8 Nov 2018 22:00:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714426; bh=PZ6RD4Oe4lfeETdlbZ8ndRHKTahOTReC0PRqk1WgVzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c6swDqfSNyQ26nkhk1GY+BBnHXlotjLiQQoSF/jZCxeiBD31CUbAw2XslZkvwCtWf 78ChlJXVwMZwNl30868AVL8YSdUZEC6oQs5JA7a7rBOIDYYg2KYgXzkNd5SMmAPNAw qNF8ZTV8E5H0Nss6qwpTD1dWcwhwp0jB6oRG1+qA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Felipe Balbi , Sasha Levin Subject: [PATCH 4.4 072/114] usb: dwc3: omap: fix error return code in dwc3_omap_probe() Date: Thu, 8 Nov 2018 13:51:27 -0800 Message-Id: <20181108215107.542043791@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 0ae99ecba7928c7bc66cf14d8a88f0b6ec9fc78e ] platform_get_irq() returns an error code, but the dwc3-omap driver ignores it and always returns -EINVAL. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. 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 Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/dwc3/dwc3-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 22e9606d8e08..9078af0ce06c 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -469,8 +469,8 @@ static int dwc3_omap_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { - dev_err(dev, "missing IRQ resource\n"); - return -EINVAL; + dev_err(dev, "missing IRQ resource: %d\n", irq); + return irq; } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- 2.17.1