Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2722943imj; Mon, 11 Feb 2019 07:31:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IYZF3aVtxToILO5CJb/daWhjsMbzSzN6FZAXTjv3vx8z3vLJo4wfUVQJLJPaQvJdp9ssp/G X-Received: by 2002:a17:902:282a:: with SMTP id e39mr38209397plb.26.1549899092379; Mon, 11 Feb 2019 07:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549899092; cv=none; d=google.com; s=arc-20160816; b=bdQcOFommlB4hvYmgKKhh0VKXfhYwEK9+9J3mFXIVyStN5YkfHE/ovPNqtXES3Y1o7 d938H61106s6D3VfyxtSA+K525bzAELET90LhH7ZUQ8DtUlVc3c0JX5t3w3v2CgNoxgz B+CgqtAWfOsCHUn31DIDbWGA9hKzjpWJIHiXBYS46HsGhJOuxOMbvfXbLsRzDg3DHM7l j4zlpbZvI3HJ1r0gUPs+/UfY8L0WbVqq+ZO34jY//nFWk/rxnPVZBu/ziXC3UiwOntoN SEvRjH714ywQJVkE+WOdBE6jbxsBM7s+IFOG11RB+8L7MR4OOI/Nhzfm/eJ3DuezvlBm oVMw== 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=sEO+Ga/4G4RyOilMSopdoVlLXuyxsuDo85Xx4hH/vJI=; b=XOk8E0NCEBUdJ+aAJ2cFsNNhJu8kMdVawb67hMBWl+tWohBKe2/15Zh/W8Msq9SxWw mkhw1BtATlwX2+ToGwYPkbg3ayW2fbV9intguuqyQAZ7T1WohthRMPdLKgyztsL/65q9 AxPSv6lFaf1vpkVlDblYisoCL5U3Ufc0HdlrugIQ9XIdQVkO7fxVgepW4LypSu38AjUF B4x1MktMuoF9+h60gw5Hgm0xLLL53W70w0vXSJR5bBj3MQKBmzVXmqqG54Djblpw8rPF +JXP9Ra3vF96sig//hxjopBvDE/ch4optLBXG6J6p0v7F0KYQttB0LarUfjjXQrA7TT/ vgVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mb1iG1pC; 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 r17si9423414pgh.299.2019.02.11.07.31.15; Mon, 11 Feb 2019 07:31:32 -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=Mb1iG1pC; 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 S2389454AbfBKO6B (ORCPT + 99 others); Mon, 11 Feb 2019 09:58:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:45504 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389046AbfBKO56 (ORCPT ); Mon, 11 Feb 2019 09:57:58 -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 3058E2229E; Mon, 11 Feb 2019 14:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897077; bh=iaYF0DbVgdycSaXEYR2PGMIStuX2Rj1veFuuAA/BKyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mb1iG1pC7FhCGpEQ/N1lhicJnvj7jPbpdSL8I2vw0Wh5PkNXme+aGeZo+KR7rWZbw AZP91yX291kpkQEWywhZ2nDwu4ceHBylgMrdwOX4OMKZmbBNYGnKzF2dl+yGnsLpLY 1Nt/IzIzGOwJ4/DLLmNKm2+zcL5x6JvaZTnphIBs= 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.14 082/205] sata_rcar: fix deferred probing Date: Mon, 11 Feb 2019 15:18:00 +0100 Message-Id: <20190211141834.056632944@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@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.14-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 537d11869069..3e82a4ac239e 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -880,7 +880,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(&pdev->dev, sizeof(struct sata_rcar_priv), -- 2.19.1