From patchwork Fri Jul 1 15:45:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 9210089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 119BB607D6 for ; Fri, 1 Jul 2016 15:46:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 000DC28540 for ; Fri, 1 Jul 2016 15:46:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E44FC285BA; Fri, 1 Jul 2016 15:46:11 +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=-6.9 required=2.0 tests=BAYES_00,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 3C21F28540 for ; Fri, 1 Jul 2016 15:46:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752734AbcGAPqJ (ORCPT ); Fri, 1 Jul 2016 11:46:09 -0400 Received: from www381.your-server.de ([78.46.137.84]:60804 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752716AbcGAPqI (ORCPT ); Fri, 1 Jul 2016 11:46:08 -0400 Received: from [88.198.220.131] (helo=sslproxy02.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1bJ0dq-0004O7-OY; Fri, 01 Jul 2016 17:46:06 +0200 Received: from [2003:86:2c09:5900:8200:bff:fe9b:6612] (helo=lars-laptop.ad.analog.com) by sslproxy02.your-server.de with esmtpsa (TLSv1.2:AES256-SHA:256) (Exim 4.84_2) (envelope-from ) id 1bJ0dq-0001si-Gp; Fri, 01 Jul 2016 17:46:06 +0200 From: Lars-Peter Clausen To: Vinod Koul Cc: dmaengine@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 2/3] dmaengine: axi-dmac: Propagate errors from platform_get_irq() Date: Fri, 1 Jul 2016 17:45:57 +0200 Message-Id: <1467387958-14559-2-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1467387958-14559-1-git-send-email-lars@metafoo.de> References: <1467387958-14559-1-git-send-email-lars@metafoo.de> X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.99.2/21824/Fri Jul 1 16:28:01 2016) Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Propagate errors returned by platform_get_irq() to the driver core. This will enable proper probe deferring for the driver in case the IRQ provider has not been registered yet. Signed-off-by: Lars-Peter Clausen --- drivers/dma/dma-axi-dmac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 8b0de8c..0e0dfc0 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -579,7 +579,9 @@ static int axi_dmac_probe(struct platform_device *pdev) return -ENOMEM; dmac->irq = platform_get_irq(pdev, 0); - if (dmac->irq <= 0) + if (dmac->irq < 0) + return dmac->irq; + if (dmac->irq == 0) return -EINVAL; res = platform_get_resource(pdev, IORESOURCE_MEM, 0);