Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2651981imj; Mon, 11 Feb 2019 06:30:12 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia024BUssEaRSP5dTfibQsLHwZuq4VzQM1rveYkEzl6J+hGQxFPAqhwyStGMqcC+LWl4s6n X-Received: by 2002:a17:902:7246:: with SMTP id c6mr5288098pll.68.1549895412268; Mon, 11 Feb 2019 06:30:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895412; cv=none; d=google.com; s=arc-20160816; b=WlJN9StipwGKhOdmcINsR8V1G3GUQcxyH2u5p9N5Xtai2Kx6ISd8sAPSqN4weDaZ8L S5OXIZT3Oj0NWnB2KxHZ9slfxvvRGyB11hB94hdfqzKKDjgvV5C/p2UoiRlfwZB1LMaB 82jQHJj/AjZD4FJEVVznzZ2vxHcDPrESCwk/rc632Q7c62je4EATpa6A15LnXvgbl2lE nMMWEqmMRbf46IWYRX8rvvJKL1gqhqPwpf56Yv19Z1YUm8j9O92JfAnlFets4xbc79hC nX/QpMlq7oWF6Z5V9VW+ftw7XMRObatKEVfEJHOMfNgYwX2eqIkrLfxA+U7c/1HJcVtO VXrw== 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=rmk+xF1QFHc+jdARwoAent5UCJGKB7YjRVAp4ALLjMY=; b=YGe/kJqj7UztxATgAzCefhR6136RMCmRor0cTBtmgWVfiLjXoYs2sA+gFrh70B1Jhv aV/aCsJ9Dy5k88OGbC1SEj1hS54MbDVw93gMOSz0erwM4vfDmYxjsdSWg0vNMec/Qjra 6wX76jDRFCgG1bxZxARiTQpdceXEdTfHRlTtgFEfE5V9rin2kvveZaEwwUPXgwgXD0T4 Gy0zDTht/Cnw23qJuw4SwW2NGniMnatnV9/ZmcOrncCUmq80hojFdqy/B3iiuo1x35a5 g89oecoivVlgDGNmVj4FwFf2TsNXkLxU3E62tl5CGROMsdhqGgHBOxTFGWxmo0IHw0Ga ONUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CQxJKilc; 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 a9si9587380pff.126.2019.02.11.06.29.53; Mon, 11 Feb 2019 06:30:12 -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=CQxJKilc; 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 S1728683AbfBKO3C (ORCPT + 99 others); Mon, 11 Feb 2019 09:29:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:35006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728242AbfBKO3A (ORCPT ); Mon, 11 Feb 2019 09:29:00 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 B278120675; Mon, 11 Feb 2019 14:28:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895339; bh=C7N1cyhPDUEi0fBjXBCft4Aq+RaJXqkYBHSjs/oJ+EA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CQxJKilcRlplApfaWQ59vGBWuuzq9rcIewHLjCbIyT4mUzXrd3C9T6hyomgz6iqcH y28RCh3HsVFE+yRebwwoziIOb4Fhj7W9cztdx0aXfVHzviKwxs5Kw28lZFRoXrYUU9 oDCM9YHMliuIaT8wO4UPWIZjd9pDuzBIJrZjfE34= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Sergei Shtylyov , Jens Axboe , Sasha Levin Subject: [PATCH 4.20 145/352] sata_rcar: fix deferred probing Date: Mon, 11 Feb 2019 15:16:12 +0100 Message-Id: <20190211141855.786017467@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 9f83cfdb1ace3ef268ecc6fda50058d2ec37d603 ] The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver would fail the probe permanently instead of the deferred probing. Switch to propagating the error code upstream, still checking/overriding IRQ0 as libata regards it as "no IRQ" (thus polling) anyway... Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Sergei Shtylyov Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/ata/sata_rcar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index 4b1ff5bc256a..59b2317acea9 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -891,7 +891,9 @@ static int sata_rcar_probe(struct platform_device *pdev) int ret = 0; irq = platform_get_irq(pdev, 0); - if (irq <= 0) + if (irq < 0) + return irq; + if (!irq) return -EINVAL; priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL); -- 2.19.1