Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933378AbdGKOnd (ORCPT ); Tue, 11 Jul 2017 10:43:33 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:36037 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933186AbdGKOn3 (ORCPT ); Tue, 11 Jul 2017 10:43:29 -0400 MIME-Version: 1.0 In-Reply-To: <20170707055928.GA11041@embeddedgus> References: <20170707055928.GA11041@embeddedgus> From: Ulf Hansson Date: Tue, 11 Jul 2017 16:43:23 +0200 Message-ID: Subject: Re: [PATCH] mmc: mxcmmc: fix error return code in mxcmci_probe() To: "Gustavo A. R. Silva" Cc: "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1215 Lines: 39 On 7 July 2017 at 07:59, Gustavo A. R. Silva wrote: > platform_get_irq() returns an error code, but the mxcmmc driver > ignores it and always returns -EINVAL. This is not correct, > and prevents -EPROBE_DEFER from being propagated properly. > > Print error message and propagate the return value of > platform_get_irq on failure. > > Signed-off-by: Gustavo A. R. Silva Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/mxcmmc.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c > index fb3ca82..f3c2832 100644 > --- a/drivers/mmc/host/mxcmmc.c > +++ b/drivers/mmc/host/mxcmmc.c > @@ -1014,8 +1014,10 @@ static int mxcmci_probe(struct platform_device *pdev) > > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > irq = platform_get_irq(pdev, 0); > - if (irq < 0) > - return -EINVAL; > + if (irq < 0) { > + dev_err(&pdev->dev, "failed to get IRQ: %d\n", irq); > + return irq; > + } > > mmc = mmc_alloc_host(sizeof(*host), &pdev->dev); > if (!mmc) > -- > 2.5.0 >