Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3703393imu; Mon, 28 Jan 2019 09:18:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN4PZr7PImYhZKTX4Pr/HpAMHX5W7m3xdYEVygJG8QuRXsRAwiTqOLTd/LxsuaOW05SmiCct X-Received: by 2002:a17:902:4624:: with SMTP id o33mr22151522pld.289.1548695916127; Mon, 28 Jan 2019 09:18:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548695916; cv=none; d=google.com; s=arc-20160816; b=sQA7UwoQ62Uc9SmDb9/BEgubzLn+uJI5MBxcIjDhVjg8QfwuJ3WjH37ueroA4HHITT 7pDqVythGQEn1vPYT5WwIoJea9sbu5ao0DP4/AwRXMrvZAgKkNg5JWqiI+xRjbB19aRv 3umtS1Gg6ekAhGGSCRQFBeFnrT70WL77MO4U6aY73MPBUpgPQF2VH/JNuCSoChlb8/BF t+gmMfbmyPRDSCJn+dS8SInH85MC+kXa0mzgdwCTHR+h5ED78bz5wqgHBQDjEuuK/GXt PRnSlN4qNL9jxPnZHl7MYB3uh2IBEA0VlvUdH+vvHu78E1V9fOPijeO/0EVI0Hk7JfGy SgJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S3AkmklkOQRsBrUjPqQyYVuC56MNAy/FBESResimYzw=; b=oii7tGLnkhyrcE9XX0Tq0fRrboFOQEbDAnek1/RJMWL2lKAcOrs1LwNC+9XsIlcu11 UkoKGFp9RPZ2UbqHhl+A5dxj03hs7y8zQwz0sRSSDmS+wusnSkV73161EwefENhv+4ja ZE7okHBpO74+pJ7PcrsvKa0HNB52neJKGlr/4vrlcNwotrgnvg20K6bZy291S1hn3oYt Q/E3w7Ut24UlTbQDH1HDteVVc+mU8MAj1gkKl7hkeky5ilw3N5zCTuZoVF/urmjdZmh5 ezpCdyB6AvMLbBm4OGbMKM8MYriGnm4fQygTLAKiGNTVQj+d2V7MuT2voLrTyCPILbwR BlMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yMyLmtXo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3si11769018plb.209.2019.01.28.09.18.20; Mon, 28 Jan 2019 09:18:36 -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=yMyLmtXo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731482AbfA1RRp (ORCPT + 99 others); Mon, 28 Jan 2019 12:17:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:52332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731847AbfA1QFa (ORCPT ); Mon, 28 Jan 2019 11:05:30 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C38B92175B; Mon, 28 Jan 2019 16:05:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691530; bh=fY99KMwyE9+sqB+t9+rXMA94QnEHEzQYT4MeZxn3koA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yMyLmtXofSbJ+mi7hFXk975eqLuGkHm1EUDypZffpwmXH68XqqlqwKv4VVsEefDdA WrIHJrpPec4EFP1H01WxYcJd9K+ZimL5Orlu3sBZFxFTmsSZSQzpyh7uAyAZOdcqaM W+P16WIdupzjyYPKePrVL1pm080nHxWeSH6JLY1A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sergei Shtylyov , Jens Axboe , Sasha Levin , linux-ide@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 131/258] sata_rcar: fix deferred probing Date: Mon, 28 Jan 2019 10:57:17 -0500 Message-Id: <20190128155924.51521-131-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sergei Shtylyov [ 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 10ecb232245d..03867f539f3a 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -895,7 +895,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