From: Qian Cai Subject: Re: [PATCH -next] acpi/hmat: fix memory leaks in hmat_init() Date: Tue, 09 Apr 2019 11:33:16 -0400 Message-ID: <1554823996.26196.48.camel@lca.pw> References: <20190406181704.33574-1-cai@lca.pw> <1554816309.26196.46.camel@lca.pw> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Len Brown , Keith Busch , Greg Kroah-Hartman , ACPI Devel Maling List , Linux Kernel Mailing List List-Id: linux-acpi@vger.kernel.org On Tue, 2019-04-09 at 16:54 +0200, Rafael J. Wysocki wrote: > Fewer jumps are easier to follow in general, so avoiding ones that can > be avoided is helpful. > > I'm not buying the argument about more code line changes needed if the > function name changes.  It's meaningless. > > And if you check the return value of acpi_get_table() for SRAT after > calling acpi_put_table(tbl), you will only need the out_free label, if > I'm not mistaken. I don't really understand this. status = acpi_get_table(ACPI_SIG_SRAT acpi_put_table(tbl); status = acpi_get_table(ACPI_SIG_HMAT If acpi_get_table(ACPI_SIG_SRAT failed, there is no point calling acpi_put_table(), so what is the point checking return value of acpi_get_table() for SRAT after acpi_put_table() ?