Received: by 10.192.165.156 with SMTP id m28csp62154imm; Tue, 10 Apr 2018 16:26:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Jb5dlcKgug9w5/gm4Sm67MmU7MudSem+/2tWrKQwSylCXJ8kI1R2nFIQ6AVu63fq9mq5E X-Received: by 2002:a17:902:887:: with SMTP id 7-v6mr2454609pll.319.1523402766639; Tue, 10 Apr 2018 16:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523402766; cv=none; d=google.com; s=arc-20160816; b=eja/aOi8zRRl8iFSeFdfNNRwsXgNErL5wnDKV4cgAnttOnBO5UyVoMTL8xnylcg8hA TKWnFcnXdTXc9FcGXLYJCezzMXk3bjf37b57uZhL/nSLkjoaBHMxqGN5UqZJxmq8xn0P EX/1zJUZp39LkTeJRN/Hk+DKkXSFdz0WdKkv1+1kVAeYKgghZ+SKpvOlRBy3VBMMGKy+ RzZnjbTnPyw9zZOwehTpP9yCu/658xcQomKEI3K+OFNxmlKG618nEY3X9XE8f91HGqKy 7iakJZtdLOMHYyX8AKS+XOiAyv6RhAkI1/9KhYMBRgY9mzQ5UStDID9/hLX9zgUawpbH koig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NB+c7DK11uGq7Gj0M+nEzPhIiiBoYfXXwgkch9cdDJA=; b=rF3TPhplAtym9d81Rq1spYTpVJgNiYw8uPx5d2ct6UJ2gjAWofg4EIqhJj8oJ2of08 jyIhE3jNJMR3ZlxlA76dnEPmTLGhDDCrOlnRKi0VBlQPlUsoriQAnM8f2IWg2di8UEFW RvraFydWOzOB38v9vG70UyFuORYPvG9y0gl7le2+j2ahoocFFJIWWu7NRR4RCzPgSg8o aTAeMjXlW3MUAIKiHUrFOYLt1k5yVyxkoEtxmjy/dUUfIRgHsKK2kV/w17gHsz+Ew9RY 7/wPBmT2sgLS6oDsWc8UirQvzyIXcnPG9tiU2dn9DsrzeoEf7WUxogFH+tFfTDyv2iK2 t93w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si2897954pfa.95.2018.04.10.16.25.30; Tue, 10 Apr 2018 16:26:06 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755487AbeDJXUL (ORCPT + 99 others); Tue, 10 Apr 2018 19:20:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40212 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754708AbeDJWa7 (ORCPT ); Tue, 10 Apr 2018 18:30:59 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 819C1DE0; Tue, 10 Apr 2018 22:30:58 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , David Daney , Linus Walleij , Sasha Levin Subject: [PATCH 4.15 097/168] gpio: thunderx: fix error return code in thunderx_gpio_probe() Date: Wed, 11 Apr 2018 00:23:59 +0200 Message-Id: <20180410212804.379928685@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wei Yongjun [ Upstream commit 76e28f5ffed82b1e81a86c4eb8d0420515765620 ] Fix to return error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 5a2a30024d8c ("gpio: Add gpio driver support for ThunderX and OCTEON-TX") Signed-off-by: Wei Yongjun Acked-by: David Daney Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-thunderx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpio/gpio-thunderx.c +++ b/drivers/gpio/gpio-thunderx.c @@ -553,8 +553,10 @@ static int thunderx_gpio_probe(struct pc txgpio->irqd = irq_domain_create_hierarchy(irq_get_irq_data(txgpio->msix_entries[0].vector)->domain, 0, 0, of_node_to_fwnode(dev->of_node), &thunderx_gpio_irqd_ops, txgpio); - if (!txgpio->irqd) + if (!txgpio->irqd) { + err = -ENOMEM; goto out; + } /* Push on irq_data and the domain for each line. */ for (i = 0; i < ngpio; i++) {