Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1320691yba; Tue, 2 Apr 2019 06:49:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxGM5XvXLBNIAxxIkAXaN3mSSshH1nn8O7eg1KSwN+FxVc9ZE4clHUjII/fuq33b2jKFIa X-Received: by 2002:a62:a513:: with SMTP id v19mr12166047pfm.212.1554212995427; Tue, 02 Apr 2019 06:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554212995; cv=none; d=google.com; s=arc-20160816; b=pGWL//205GXmqTJgm1erDJJMG9TQqhJaiJbHE+A4wx9ziWY/XLzZ8CAkt+lbyecias JcPhNcgVqRi5CaOHvVVIS+6WsceoWGTqcmrdgfIKUT+/XT0d4e8jtfq5ZrYtIu9oiQ88 83cJhKY6qLtDrUPnkBvvEoe4kPso1ErNjk8HIYxHQ46Xame2XSK30cRqHK1OziNBL0tf POXLhtP2MwjyDoqJ1d64H8vMjvjcoRoBpPhWJ5E84EFEM4/w5fNkbAsYIuylMki3Tg3N 6JNMcF1VMQjGnDXQF9B4s80CNhAJx1Bgdq2eAlClLmMKlK5KsbMjecv++ZTlFE3myaSF BEyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=ACiuIU2W+shtAHLO9u4hbo+DjDJDN0AQ8prB51/W4Dg=; b=aPnNiW9e/us0XLdX1ioVRv5SqB8rhH6CJQE3MkF0aSmWRwb5t+hrJqp5roJku2R0cj 0D70umQhq4gICNX7aBqJOfGlOz0V2E/YpLm/ItDo2qE7lVNbghu1mj19EWes1ZRXQtms 0F0T3xUyxiXAOKyV/weipujGi4yBxA7ajJx5vpx2ewD7aKLHq+/RvvYkuNpJEt5LIojL Mj8qDbp4P9dfO4vCQ8skomuwNlyZ00Mk6CJ16tuUbW0pVflSrcIQT9aGuqb0xJC8pk0I jg2PeEo87Oze8UG/UVxwnCOoyg140WW4/S5KdKVst0STy+ndWebGL3CVuUzobgBFQJFO 8/9g== ARC-Authentication-Results: i=1; mx.google.com; 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 g40si11456826plb.146.2019.04.02.06.49.39; Tue, 02 Apr 2019 06:49:55 -0700 (PDT) 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; 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 S1732177AbfDBNsY (ORCPT + 99 others); Tue, 2 Apr 2019 09:48:24 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:42960 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731141AbfDBNkD (ORCPT ); Tue, 2 Apr 2019 09:40:03 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJdw-0002nQ-4R; Tue, 02 Apr 2019 14:40:00 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdu-0004sf-Vz; Tue, 02 Apr 2019 14:39:58 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Sergei Shtylyov" , "Jens Axboe" , "Geert Uytterhoeven" , "Simon Horman" Date: Tue, 02 Apr 2019 14:38:27 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 28/99] sata_rcar: fix deferred probing In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.65-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Sergei Shtylyov commit 9f83cfdb1ace3ef268ecc6fda50058d2ec37d603 upstream. 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: Ben Hutchings --- drivers/ata/sata_rcar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -874,7 +874,9 @@ static int sata_rcar_probe(struct platfo int ret = 0; irq = platform_get_irq(pdev, 0); - if (irq <= 0) + if (irq < 0) + return irq; + if (!irq) return -EINVAL; priv = devm_kzalloc(&pdev->dev, sizeof(struct sata_rcar_priv),