From patchwork Sat Nov 24 18:14:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10696561 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7BAB14BD for ; Sat, 24 Nov 2018 18:14:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C15BF287AB for ; Sat, 24 Nov 2018 18:14:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF279287A6; Sat, 24 Nov 2018 18:14:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56E11287E0 for ; Sat, 24 Nov 2018 18:14:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725198AbeKYFDR (ORCPT ); Sun, 25 Nov 2018 00:03:17 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34992 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725744AbeKYFDR (ORCPT ); Sun, 25 Nov 2018 00:03:17 -0500 Received: by mail-lj1-f196.google.com with SMTP id x85-v6so13131876ljb.2 for ; Sat, 24 Nov 2018 10:14:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=to:cc:from:subject:organization:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=9N6pBWyhV1i5nGPWF50FYuwS8JtssNOoVrq+En0x150=; b=OZ6JtkujIHY0g+CHXUK6FuMce/CcEzqpVES5i2gec26R4ORn6chmAGvCx28yWjbfS5 cfWO4R67hIoLhGSYeP4m8IpkvxY2EyxJ+AWgJ2NGKpHa3ofpuFNJC400IBzdncxfK3OF Gbk9M+3w9f4etx4FhtAOKiG1TkqB8wqUkHDJjdv/S7/tjagOUcIBmLgmWl4NIMKq+FOI eCqdYRBS4rp/LoR/rdGesl98BsYmrY9sYqZUVUFwIG5zbxQLXXkqCGO+6rgl49Afm4M3 oHzc+69fx0aFVhGcmdp2SmUGiXSMGNnLdVIb46o1+XXKchjQyCcZxefr0Lu3HGHdEH2b H5Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:organization:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=9N6pBWyhV1i5nGPWF50FYuwS8JtssNOoVrq+En0x150=; b=i5lFibSZLccta9jKBCIDqVavL+NnGEi084dx/ssvLYlMSNWrQKlMCLwtKST2kZkNPY xhYLiNiWgn40lTQSBGEGAPFko6eV1bhfydWc3hAUaLlv4YigH3LffHQAwzOAnw6vfV25 5dV+fhewdYZclx3XIPqO57y1uH+z/sWzIBDsKc0iD0mkeir3MJohH0P3/Ncrjxt1wwR0 HqkuFtvMX8FB9yMKogDyTlc5g6Hmr7NldauhU8AopxFn9eEq8KzJqhAuDYJjz10qYhyB FuwPYTdjnm8GubZ/+hVzX7AwqDMRW5OJZLnhgcXcr4UIDWL1kEiU++X63ma80ZlcxjeE +4Hw== X-Gm-Message-State: AA+aEWYxEt/pKb1Ym8l1ER6cj7TEesB75k6F4lClyMJg8EgXwYnitkBp Khj2pKrrFke/HXCPTSizaoRrPQqZc5s= X-Google-Smtp-Source: AFSGD/WrZ7h8LTmZwmTR9avqP0nGSjdfgOwteRs/je+855czh+0e/LgmM24dKu2qUuf3y2Xy0nWP/Q== X-Received: by 2002:a2e:1b47:: with SMTP id b68-v6mr11169986ljb.104.1543083258279; Sat, 24 Nov 2018 10:14:18 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.86.181]) by smtp.gmail.com with ESMTPSA id o26sm1240821lfl.18.2018.11.24.10.14.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Nov 2018 10:14:17 -0800 (PST) To: Jens Axboe , linux-ide@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org From: Sergei Shtylyov Subject: [PATCH] sata_rcar: fix deferred probing Organization: Cogent Embedded Message-ID: Date: Sat, 24 Nov 2018 21:14:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-MW Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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") Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven --- This patch is against the 'master' branch of Jens Axboe's 'linux-block.git' repo. drivers/ata/sata_rcar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-block/drivers/ata/sata_rcar.c =================================================================== --- linux-block.orig/drivers/ata/sata_rcar.c +++ linux-block/drivers/ata/sata_rcar.c @@ -891,7 +891,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(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);