From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] ACPI: debug: Clean up acpi_aml_init()
Date: Thu, 24 Jan 2019 20:35:47 +0100 [thread overview]
Message-ID: <20190124193547.GA13425@kroah.com> (raw)
In-Reply-To: <2715517.7WDaClUie6@aspire.rjw.lan>
On Thu, Jan 24, 2019 at 11:25:59AM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The err_exit label in acpi_aml_init() is not used any more after
> commit 9ec6dbfbdc0a ("ACPI: no need to check return value of
> debugfs_create functions"), but the other label in there is not
> necessary too, so rearrange the code to get rid of them both.
>
> No intentional functional impact.
>
> Fixes: 9ec6dbfbdc0a ("ACPI: no need to check return value of debugfs_create functions")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/acpi/acpi_dbg.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> Index: linux-pm/drivers/acpi/acpi_dbg.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/acpi_dbg.c
> +++ linux-pm/drivers/acpi/acpi_dbg.c
> @@ -750,29 +750,28 @@ static const struct acpi_debugger_ops ac
>
> int __init acpi_aml_init(void)
> {
> - int ret = 0;
> + int ret;
>
> /* Initialize AML IO interface */
> mutex_init(&acpi_aml_io.lock);
> init_waitqueue_head(&acpi_aml_io.wait);
> acpi_aml_io.out_crc.buf = acpi_aml_io.out_buf;
> acpi_aml_io.in_crc.buf = acpi_aml_io.in_buf;
> +
> acpi_aml_dentry = debugfs_create_file("acpidbg",
> S_IFREG | S_IRUGO | S_IWUSR,
> acpi_debugfs_dir, NULL,
> &acpi_aml_operations);
> - ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger);
> - if (ret)
> - goto err_fs;
> - acpi_aml_initialized = true;
>
> -err_fs:
> + ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger);
> if (ret) {
> debugfs_remove(acpi_aml_dentry);
> acpi_aml_dentry = NULL;
> + return ret;
> }
> -err_exit:
> - return ret;
> +
> + acpi_aml_initialized = true;
> + return 0;
> }
>
Odd that 0-day never reported this :(
Sorry about it, and thanks for the patch:
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
prev parent reply other threads:[~2019-01-24 19:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-24 10:25 Rafael J. Wysocki
2019-01-24 19:35 ` Greg Kroah-Hartman [this message]
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=20190124193547.GA13425@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sfr@canb.auug.org.au \
/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
Powered by JetHome