Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp19029imu; Thu, 8 Nov 2018 14:01:51 -0800 (PST) X-Google-Smtp-Source: AJdET5faBvWzDHgEhDXpWgkW3hbpM5DTALhyKPh9N+BBjuhYwwueMgLWbedWv/Zlt3g433QjuvRb X-Received: by 2002:a63:ee0e:: with SMTP id e14mr5108851pgi.8.1541714511466; Thu, 08 Nov 2018 14:01:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541714511; cv=none; d=google.com; s=arc-20160816; b=lPoTd6MD6e6dT2SABuHa+5QLQ5Ipqu/Ch2G08p62iNm17QKxrfDUNm2yka4ylVBYi0 t7HPTI7BRohpQ+U1Z9o6WV425fcXcvFe8DsDdAwFfzSbvVGhas4Mp3liHMg6j3pt9omw iI8/zpcqHMCB7gbWy7HGKsfbPij/xZeGVZxFAP6NcyErygla+/cD3Ef7FNDc8Vut+Kqx AaD5geQh2IYVE4Au+Z68FvO3h8RdfOEL4Je4iKVAO5fhXR4y1PpSXwBuYFED1wVKcRvV SwSBnM1mUnrguniIjB2tXMMo0+hdwgzikHNINM3WcQ4caTDQ260HoE1kPOPmx/zZLtTb 21Fw== 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=/AiH/E4oQUte77L/KwielHJ80fXSxXUNdgxsazGcz+E=; b=GeW9uksoDQhK1Ym5hcRoyPdbI9PSo/Gy27GRxZ5ummSmUzlBu3iMjbBjeBePene+T/ KHoLRJkTrMFEGN+8xrDxjf2LDOseV7SBqP0S88Bxy7x8HTRqeohrPNwN12imPATw6riS ZMLmKHWY47xi+QSGygcbH3KFgrnutXvuf7wz6EuctrrN416UC3T6GiBmBwvG0CLPI+mp 5OCqNLBFKpMAzJRpEYFsLEHSd9+r9ShXepGokJdZN/aff42tQwNOAaR6uiTvrej8sMxh X0qS7Cr0HDBytmMS2RmAzn6XcMLGCyLZHAIEDJkbjtiNPLR+NzpyviNTOG3N+NMLX4zy L6MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=p4Qth3uc; 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 d10-v6si5592622plo.184.2018.11.08.14.01.35; Thu, 08 Nov 2018 14:01:51 -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=p4Qth3uc; 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 S1730616AbeKIHiI (ORCPT + 99 others); Fri, 9 Nov 2018 02:38:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:57174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729667AbeKIHiH (ORCPT ); Fri, 9 Nov 2018 02:38:07 -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 699BF2146E; Thu, 8 Nov 2018 22:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714438; bh=QXSKhWIWQvJo3Qn/HXl1oDS3bk2Rp0rTbmfvI9/QU8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p4Qth3uckpwu8nbY96ce8Pi80HfRjeGO6HFUzaIJcelb4hkTn2CVGQvJKMLwidgRI CzGuckTtE/PDByYLXKwu+k/dTHVejlpDP08F93+wj+fJHDDw70MAPhrjpzOEJ69LTD 5FY/TbCM4nLpyuqK94n4bIxzT6FcvetL3r192FPA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Mark Brown , Sasha Levin Subject: [PATCH 4.4 073/114] spi/bcm63xx-hspi: fix error return code in bcm63xx_hsspi_probe() Date: Thu, 8 Nov 2018 13:51:28 -0800 Message-Id: <20181108215107.617804158@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 378da4a65f3a0390837b38145bb5d8c2d20c2cf7 ] platform_get_irq() returns an error code, but the spi-bcm63xx-hsspi driver ignores it and always returns -ENXIO. 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: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-bcm63xx-hsspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 55789f7cda92..645f428ad0a2 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -336,8 +336,8 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { - dev_err(dev, "no irq\n"); - return -ENXIO; + dev_err(dev, "no irq: %d\n", irq); + return irq; } res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- 2.17.1