From: Qian Cai <cai@lca.pw>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>, Keith Busch <keith.busch@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] acpi/hmat: fix memory leaks in hmat_init()
Date: Tue, 09 Apr 2019 11:33:16 -0400 [thread overview]
Message-ID: <1554823996.26196.48.camel@lca.pw> (raw)
In-Reply-To: <CAJZ5v0g_oLdqv_sp8Un-44wO6vtQH6rVeUTKxSynO8VPPascxA@mail.gmail.com>
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() ?
next prev parent reply other threads:[~2019-04-09 15:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-06 18:17 [PATCH -next] acpi/hmat: fix memory leaks in hmat_init() Qian Cai
2019-04-06 18:17 ` Qian Cai
2019-04-09 8:25 ` Rafael J. Wysocki
2019-04-09 8:25 ` Rafael J. Wysocki
2019-04-09 13:25 ` Qian Cai
2019-04-09 13:25 ` Qian Cai
2019-04-09 14:54 ` Rafael J. Wysocki
2019-04-09 14:54 ` Rafael J. Wysocki
2019-04-09 15:33 ` Qian Cai [this message]
2019-04-09 15:33 ` Qian Cai
2019-04-09 21:34 ` Rafael J. Wysocki
2019-04-09 21:34 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1554823996.26196.48.camel@lca.pw \
--to=cai@lca.pw \
--cc=gregkh@linuxfoundation.org \
--cc=keith.busch@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox