Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit6993ce4

Browse files
bmorkrafaeljw
authored andcommitted
ACPI: battery: Drop redundant test for failure
Merging the two adjacent conditionally built blocks makes the codea lot more readable. And as a bonus, we drop a duplicate test whenCONFIG_ACPI_PROCFS_POWER is undefined.Signed-off-by: Bjørn Mork <bjorn@mork.no>Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent50c4c4e commit6993ce4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎drivers/acpi/battery.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,13 +1237,11 @@ static int acpi_battery_add(struct acpi_device *device)
12371237

12381238
#ifdefCONFIG_ACPI_PROCFS_POWER
12391239
result=acpi_battery_add_fs(device);
1240-
#endif
12411240
if (result) {
1242-
#ifdefCONFIG_ACPI_PROCFS_POWER
12431241
acpi_battery_remove_fs(device);
1244-
#endif
12451242
gotofail;
12461243
}
1244+
#endif
12471245

12481246
printk(KERN_INFOPREFIX"%s Slot [%s] (battery %s)\n",
12491247
ACPI_BATTERY_DEVICE_NAME,acpi_device_bid(device),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp