Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp45731imu; Thu, 8 Nov 2018 14:29:55 -0800 (PST) X-Google-Smtp-Source: AJdET5fQYrNBp4COLeLCHuNF/9YMm6ypb98hHzENNq+2otTZcP5AKBszbmtcd5pPMTc7nXrrxKZI X-Received: by 2002:a63:5308:: with SMTP id h8-v6mr5204814pgb.358.1541716195780; Thu, 08 Nov 2018 14:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716195; cv=none; d=google.com; s=arc-20160816; b=q1ht85c3spUuoSqOyGJLoWPFCS4TvAC0h3nPKQoe6e9VsHnwTblH2Bj/g3+LkpgUwk kJkAmHBMZkhPTs9gtPsDNqeiM7gAqw9niHJ7n3C2F4Q4f2ePVDTlx4i5oMpsfNbnKLFU cgb26f+ZGOkwQx5oqYLBHVpz/tjUo9AUKLAyaHgqL4+JuZWqrTQqrWWyD8tUVGd5OuOp 2O82ZHaSFFd7xORIwIHG+teKDlB37XAnfajrsWvRyer9Awe7ByI3P16E8aSAS6hSNAI5 yuZTJL9H0gFPoPnC9XGxHulsZxXrev3yzukMUmjFlzFA2BnXr7/YeCGa6WdwMCGgS/Ke McBQ== 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=mUdm4dAhZa9gFhhnGq04MxzjPwv21eyfW/T9t/DV4/Q=; b=DVdy070REOUDKs4aH1YHvQy7vSVBxwqEV0URYB9Nw4HaBlcvgYZHdln0Ks9hO9PrwA 1KI8cLaPzkCod+S7O3T+O8HrxsXC1bxQ8mNmK8HIGACP9+gMnlb/ghjTRVMteBWIeZMd D4OyAqqvJI3InLFPK8MmSakA6UGhkfAOqJuHt5IJZS7KZpnnYXIfZeNut/VDx8Tn8+7Y bmaADdZnV08Dx5GXEyU6gqVxkxljmefQQT8N53mo42FSI3ORy62GFqaH0u3XTsC8wzFr scgX7aUg+HUd7SNDyIUlNAd/1vMh2C66+f9YnWC2L1a/JrivNhv/jvS0MXz/Kvl4cSQV kMjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cuPu58oW; 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 z6-v6si4619625pgr.274.2018.11.08.14.29.35; Thu, 08 Nov 2018 14:29:55 -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=cuPu58oW; 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 S1729565AbeKIIGw (ORCPT + 99 others); Fri, 9 Nov 2018 03:06:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:58036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728491AbeKIHii (ORCPT ); Fri, 9 Nov 2018 02:38:38 -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 42B5A21479; Thu, 8 Nov 2018 22:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714469; bh=JQeSYdHZs6lW9p/bVCWuYVS9Lz02X1PgU4UBC75vd+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cuPu58oW3U96IydayyMS8AHHbdESrL6xF/+tle87A0sQXrRUEFDw1tQ6e3+awpKvn dY2G5vS05zAu6l0/xpqxQZKJUhS35Dcl7hZ4viTkSWEdAvvLbmlBougcPssnwPFbaN KsFZTNNMSBpWCwQ1u5JOLcpxaNR3iLFKpCm92eNA= 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 075/114] spi/bcm63xx: fix error return code in bcm63xx_spi_probe() Date: Thu, 8 Nov 2018 13:51:30 -0800 Message-Id: <20181108215107.776162596@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 ba8afe94723e9ba665aee9cca649fb2c80f7304c ] platform_get_irq() returns an error code, but the spi-bcm63xx 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.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index bf9a610e5b89..f14500910bc2 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -496,8 +496,8 @@ static int bcm63xx_spi_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; } clk = devm_clk_get(dev, "spi"); -- 2.17.1