From: Adrian Bunk <bunk@kernel.org>
To: Alexey Starikovskiy <astarikovskiy@suse.de>,
Len Brown <len.brown@intel.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] acpi/battery.c: remove dead code
Date: Wed, 24 Oct 2007 18:25:37 +0200 [thread overview]
Message-ID: <20071024162537.GA30533@stusta.de> (raw)
After commit f1d4661abe05d0a2c014166042d15ed8b69ae8f2 this was dead
code.
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
--- linux-2.6/drivers/acpi/battery.c.old 2007-10-23 18:44:13.000000000 +0200
+++ linux-2.6/drivers/acpi/battery.c 2007-10-23 18:44:43.000000000 +0200
@@ -550,18 +550,14 @@ static ssize_t acpi_battery_write_alarm(
int result = 0;
char alarm_string[12] = { '\0' };
struct seq_file *m = file->private_data;
struct acpi_battery *battery = m->private;
if (!battery || (count > sizeof(alarm_string) - 1))
return -EINVAL;
- if (result) {
- result = -ENODEV;
- goto end;
- }
if (!acpi_battery_present(battery)) {
result = -ENODEV;
goto end;
}
if (copy_from_user(alarm_string, buffer, count)) {
result = -EFAULT;
goto end;
next reply other threads:[~2007-10-24 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 16:25 Adrian Bunk [this message]
2007-10-24 17:18 ` [2.6 patch] acpi/battery.c: remove dead code Alexey Starikovskiy
2007-10-25 20:38 ` Len Brown
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=20071024162537.GA30533@stusta.de \
--to=bunk@kernel.org \
--cc=astarikovskiy@suse.de \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@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.