From: Dan Carpenter <error27@gmail.com>
To: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>,
platform-driver-x86@vger.kernel.org, dmitry.torokhov@gmail.com,
kernel-janitors@vger.kernel.org
Subject: [patch] WMI: return error if wmi_create_device() fails
Date: Thu, 25 Nov 2010 17:35:52 +0000 [thread overview]
Message-ID: <20101125173552.GB12939@bicker> (raw)
The break resets the retval to 0 but we want to return an error code.
This was introduced in c64eefd48c4 "WMI: embed struct device directly
into wmi_block"
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 104b77c..a5b7a4d 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -812,7 +812,7 @@ static acpi_status parse_wdg(acpi_handle handle)
if (IS_ERR(wblock)) {
retval = PTR_ERR(wblock);
wmi_free_devices();
- break;
+ goto out_free_pointer;
}
if (debug_event) {
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>,
platform-driver-x86@vger.kernel.org, dmitry.torokhov@gmail.com,
kernel-janitors@vger.kernel.org
Subject: [patch] WMI: return error if wmi_create_device() fails
Date: Thu, 25 Nov 2010 20:35:52 +0300 [thread overview]
Message-ID: <20101125173552.GB12939@bicker> (raw)
The break resets the retval to 0 but we want to return an error code.
This was introduced in c64eefd48c4 "WMI: embed struct device directly
into wmi_block"
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 104b77c..a5b7a4d 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -812,7 +812,7 @@ static acpi_status parse_wdg(acpi_handle handle)
if (IS_ERR(wblock)) {
retval = PTR_ERR(wblock);
wmi_free_devices();
- break;
+ goto out_free_pointer;
}
if (debug_event) {
next reply other threads:[~2010-11-25 17:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-25 17:35 Dan Carpenter [this message]
2010-11-25 17:35 ` [patch] WMI: return error if wmi_create_device() fails Dan Carpenter
2010-11-27 8:20 ` Dmitry Torokhov
2010-11-27 8:20 ` Dmitry Torokhov
2010-12-06 22:02 ` Matthew Garrett
2010-12-06 22:02 ` Matthew Garrett
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=20101125173552.GB12939@bicker \
--to=error27@gmail.com \
--cc=carlos@strangeworlds.co.uk \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.