Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754107Ab3EUPLN (ORCPT ); Tue, 21 May 2013 11:11:13 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:36521 "EHLO mail-bk0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751766Ab3EUPLM (ORCPT ); Tue, 21 May 2013 11:11:12 -0400 MIME-Version: 1.0 Date: Tue, 21 May 2013 23:11:10 +0800 Message-ID: Subject: [PATCH -next] gpio-ml-ioh: fix error return code in ioh_gpio_probe() From: Wei Yongjun To: grant.likely@linaro.org, linus.walleij@linaro.org Cc: yongjun_wei@trendmicro.com.cn, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 976 Lines: 28 From: Wei Yongjun Fix to return a negative error code in the irq descs alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/gpio/gpio-ml-ioh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c index 0966f26..6da6d76 100644 --- a/drivers/gpio/gpio-ml-ioh.c +++ b/drivers/gpio/gpio-ml-ioh.c @@ -465,6 +465,7 @@ static int ioh_gpio_probe(struct pci_dev *pdev, dev_warn(&pdev->dev, "ml_ioh_gpio: Failed to get IRQ base num\n"); chip->irq_base = -1; + ret = irq_base; goto err_irq_alloc_descs; } chip->irq_base = irq_base; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/