Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2672294ioo; Tue, 24 May 2022 03:25:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwftfHChYtZ4YjZPj0HG1srcZovIYS3R/DaL+Ujnc6o4ucyFcA5KNN2q52coNZVCn4XTxFh X-Received: by 2002:a05:6402:510d:b0:42b:670d:da4d with SMTP id m13-20020a056402510d00b0042b670dda4dmr9751486edd.87.1653387943419; Tue, 24 May 2022 03:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653387943; cv=none; d=google.com; s=arc-20160816; b=kBpLd/UrZinseY8daCjHgAkjjcbCoOZCcp83CmMIflDwCSGZSFq1Qyrz7nLyngxT96 17zAOlqaiUIgWGtQHHQrlqGMqkXiRUvXPbp7sYbJ5QAHLsyO/ZkhKtyZQStj9YDsviql pD7SIxuD0aqsA1DrxETdMXzEnItBily7JSULmc+4Sv4j1bE0Es5v7xZ3pwQE1lHi0Hv/ lZWAG/uhW+fTKLDaUcMVDEerOXER+uB+4uvNUbBGMkmPljkAIvntRoP+JzYEwX4l1HZj dDTRjI3FKlBLJy86N/C4QAAeJKxnVcdinRpMRjhNTCyznV9zhvF7O7VS0zpmRfCgZU6C WMVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gpoYIKS4QUYo6vRQthp0gKF6ZJ0r0DCLL99IdJVzdn0=; b=NcjIKpCRZMSNryMQVfmj44U8LdlpRGRCqdovRxX94Ij/rijgTMOMamlSTt5oRpEw9V CeUTIRa9ijGkc+lBxphjMlQB7LPB8YoOvODqLs4LdPBysTQ5mDmdu8R0faizYfqQXdpM m6NmkLZo6Tc7AlStwrgBUFt8GKP7YQ0bnGhyZIpIYMPLzzT5MHlSx/4bJ57TvRA5drIi aldx+jRCm/krArOYsFEsUpG0JpBAdA2f/Oz9SjiE8nC3HjELk1+P1ZvoWZ4pzHXqv//Y ClSPKhRi7RSLAbONf0CT65kGAYiIAshGwsZVwg5zvY2uD0xg3tDX1lW8B2xxGrWw4LXt RSqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=lsi6UHkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kx6-20020a170907774600b006f39645649asi643652ejc.639.2022.05.24.03.25.15; Tue, 24 May 2022 03:25:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=lsi6UHkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233997AbiEXFlX (ORCPT + 99 others); Tue, 24 May 2022 01:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233975AbiEXFlR (ORCPT ); Tue, 24 May 2022 01:41:17 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFEFB26AD3 for ; Mon, 23 May 2022 22:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1653370867; bh=GWUSG80uMKJQGJDBdWfDSlGvhK3zw5IeGPqEh98zoes=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=lsi6UHkbt8rN1g9x3EgAClnd00T9TZ+dY46ZTuKqiaryvOLwhOLmk6NvhMBNFqqy6 mEomqDvW8LbNhptiUcpEFIE6FufFZKDKgJ/0mESmsXVHaP6VWHoyvbYunF1ia5UIEu mzle4fkEtOTW2xeDYCBPuTpqFD9QoIHOe5lfCyJU= Received: from [192.168.9.172] (unknown [101.88.28.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id BCD2A60074; Tue, 24 May 2022 13:41:07 +0800 (CST) Message-ID: Date: Tue, 24 May 2022 13:41:07 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0a1 Subject: Re: [PATCH] irqchip/loongson-liointc: Fix an error handling path in liointc_init() To: Huacai Chen , Christophe JAILLET Cc: dan.carpenter@oracle.com, Jiaxun Yang , Thomas Gleixner , Marc Zyngier , LKML , kernel-janitors@vger.kernel.org, "open list:MIPS" References: <1c4e81eda5f9651f581f1554629d334f1afda841.1653227039.git.christophe.jaillet@wanadoo.fr> Content-Language: en-US From: WANG Xuerui In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Huacai, On 5/24/22 11:47, Huacai Chen wrote: > Hi, Christophe, > > On Tue, May 24, 2022 at 10:50 AM Huacai Chen wrote: >> Hi, Christophe, >> >> On Sun, May 22, 2022 at 9:44 PM Christophe JAILLET >> wrote: >>> If a of_property_match_string() call fails, we still need to release some >>> resources. >>> Add the corresponding goto instead of a direct return. >> Your patch is correct, but 807e93d0ecbb hasn't been upstream, I don't >> know how to handle it. >> >> Huacai >>> Fixes: 807e93d0ecbb ("irqchip/loongson-liointc: Add ACPI init support") >>> Signed-off-by: Christophe JAILLET >>> --- >>> drivers/irqchip/irq-loongson-liointc.c | 6 ++++-- >>> 1 file changed, 4 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c >>> index ff3cb5b05710..2227b702a81d 100644 >>> --- a/drivers/irqchip/irq-loongson-liointc.c >>> +++ b/drivers/irqchip/irq-loongson-liointc.c >>> @@ -185,8 +185,10 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision, >>> int index = of_property_match_string(node, >>> "reg-names", core_reg_names[i]); >>> >>> - if (index < 0) >>> - return -EINVAL; >>> + if (index < 0) { >>> + err = -EINVAL; >>> + goto out_iounmap; >>> + } > Just goto out_iounmap is OK, because it returns -EINVAL at last. > I've squash your patch to the original one and add a Co-developed-by:, > not sure it is the best solution. Thanks. You could also "Reported-by" and/or "Suggested-by", to give proper credit. Mention of this mail thread (link to lore.kernel.org archive maybe) in the commit message is good too. > > Huacai >>> priv->core_isr[i] = of_iomap(node, index); >>> } >>> -- >>> 2.34.1 >>>