summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-06-15 14:13:45 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-06-18 10:58:53 +0300
commit966165f9fc59b7cb839fcad3d4b825a4eaca1033 (patch)
treee0d341618856a7e439eecf44de51fa51deb23562 /src/device.c
parenta3a22426303e048d58d0dcb907ce16e8ef92c624 (diff)
downloadconnman-966165f9fc59b7cb839fcad3d4b825a4eaca1033.tar.gz
connman-966165f9fc59b7cb839fcad3d4b825a4eaca1033.tar.bz2
connman-966165f9fc59b7cb839fcad3d4b825a4eaca1033.zip
device: Combine two if statements with identical outcome
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/device.c b/src/device.c
index 3af36800..96254445 100644
--- a/src/device.c
+++ b/src/device.c
@@ -247,12 +247,7 @@ int __connman_device_disable(struct connman_device *device)
}
err = device->driver->disable(device);
- if (err == 0) {
- connman_device_set_powered(device, FALSE);
- goto done;
- }
-
- if (err == -EALREADY) {
+ if (err == 0 || err == -EALREADY) {
connman_device_set_powered(device, FALSE);
goto done;
}