Received: by 10.192.165.156 with SMTP id m28csp39724imm; Tue, 10 Apr 2018 15:58:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx48zR/Dd2hupLvmYWLehQDy2tL7MbTDSC1qFps8aSgIT3L3w5cvNLpVpckjhqi2kjVxSA6S1 X-Received: by 2002:a17:902:ca4:: with SMTP id 33-v6mr2376893plt.25.1523401083387; Tue, 10 Apr 2018 15:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523401083; cv=none; d=google.com; s=arc-20160816; b=Yw5Vs+PRSqeTKayPInzlGPk6cpRmDtfwlyLsr4vA+sfzTJo2rhawFauinmwh2Uxlm+ HENh4EhEoMtjcf1LhcpVevr2Y5v0+b6aE60id1YdiQ+FyG04Uhln1Q0U/LWEAnKdac1o jktpS3irEoYv8FZ/5Qvw8RFD5zWyS/6PpMzS0KWjVNa5UK3CkNlQOZ6sc8s+l/GEHEwW kIGULuXD7ZOAEGbKSLwzQmIgIJ+46TgZUMPOrxuhh9cXTxpDJlsNmk+eQMBH9+8dMNfR 3ZUdQABLyRgejEPx5aPIb2j7Nk8uQT3LQEbZbp8R3jY5nJe+CThFU1eefWDouHIOdLWq lnYA== 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=N0tQuKo91dcgWfYaxIhv19xqX+rhvYfnHwIS2QngHV8=; b=n8rm3//jJK7vC6PJFtv9uVrFyDD+sA0C7Q6merrto8pI+DaTrTeYNtq1JsAc5O0lQY 88D34Ndqnq9MgF0B2vaJKvcy6+dLexZFYTozG+8HejYw+wpgTZZ6gfVqbRW28453k1Sd AgCRrFQNMF6jbXbAqIgzWVh2UVZgWhgXiET+GJX1CD55ZqpVt1VearcxmyiOYSUZiqyN I50tUdcBS04IZPlpUThCCSULHdcYbvxOairOqLYKswPqQKHm7wATckBlJcdLlSiMaXOp e6pvKJRwVRt2dKLeIKiz1l/PICf24FaroYHS/x9LqnLvzvWGSGd7D0w9YNJuWBAc4kvh M9Rg== 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 c6si2869903pfl.136.2018.04.10.15.57.27; Tue, 10 Apr 2018 15:58:03 -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 S1755841AbeDJWhp (ORCPT + 99 others); Tue, 10 Apr 2018 18:37:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43860 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755823AbeDJWhl (ORCPT ); Tue, 10 Apr 2018 18:37:41 -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 7C22F408; Tue, 10 Apr 2018 22:37:40 +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.14 073/138] gpio: thunderx: fix error return code in thunderx_gpio_probe() Date: Wed, 11 Apr 2018 00:24:23 +0200 Message-Id: <20180410212910.603064670@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@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.14-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 @@ -566,8 +566,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++) {