tangled
alpha
login
or
join now
tjh.dev
/
kernel
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Pull bugzilla-7570 into release branch
Len Brown
19 years ago
cb2ebc59
3dfb7379
+7
-6
1 changed file
expand all
collapse all
unified
split
drivers
acpi
power.c
+7
-6
drivers/acpi/power.c
···
436
cl = &device->power.states[device->power.state].resources;
437
tl = &device->power.states[state].resources;
438
439
-
device->power.state = ACPI_STATE_UNKNOWN;
440
-
441
if (!cl->count && !tl->count) {
442
result = -ENODEV;
443
goto end;
···
466
goto end;
467
}
468
469
-
/* We shouldn't change the state till all above operations succeed */
470
-
device->power.state = state;
471
-
end:
472
-
if (result)
473
printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n",
474
device->pnp.bus_id, state);
0
0
0
0
475
476
return result;
477
}
···
436
cl = &device->power.states[device->power.state].resources;
437
tl = &device->power.states[state].resources;
438
0
0
439
if (!cl->count && !tl->count) {
440
result = -ENODEV;
441
goto end;
···
468
goto end;
469
}
470
471
+
end:
472
+
if (result) {
473
+
device->power.state = ACPI_STATE_UNKNOWN;
0
474
printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n",
475
device->pnp.bus_id, state);
476
+
} else {
477
+
/* We shouldn't change the state till all above operations succeed */
478
+
device->power.state = state;
479
+
}
480
481
return result;
482
}