diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-07-09 15:19:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-07-09 15:19:16 +0000 |
commit | 408ba7d2761195e2126b2fb29eea2077c9f5ce85 (patch) | |
tree | 34592efd211782870f7a2d99c257b8efd38a34aa /sys | |
parent | a9b11517bfdd0e4a81bb2ffe7be7adc147df71f3 (diff) |
clean up ioctl() case statements
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpi/acpi.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 0acaebb4eff..9dfd3a5015f 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.234 2012/07/09 15:04:12 deraadt Exp $ */ +/* $OpenBSD: acpi.c,v 1.235 2012/07/09 15:19:15 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2499,23 +2499,23 @@ acpiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) case APM_IOC_STANDBY: if ((flag & FWRITE) == 0) { error = EBADF; - } else { - acpi_addtask(sc, acpi_sleep_task, sc, ACPI_STATE_S3); - acpi_wakeup(sc); + break; } + acpi_addtask(sc, acpi_sleep_task, sc, ACPI_STATE_S3); + acpi_wakeup(sc); break; #ifdef HIBERNATE case APM_IOC_HIBERNATE: if ((flag & FWRITE) == 0) { error = EBADF; - } else { - if (get_hibernate_io_function() == NULL) { - error = EOPNOTSUPP; - } else { - acpi_addtask(sc, acpi_sleep_task, sc, - ACPI_STATE_S4); - acpi_wakeup(sc); - } + break; + } + if (get_hibernate_io_function() == NULL) { + error = EOPNOTSUPP; + break; + } + acpi_addtask(sc, acpi_sleep_task, sc, ACPI_STATE_S4); + acpi_wakeup(sc); } break; #endif |