diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-06-15 14:13:45 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-06-18 10:58:53 +0300 |
commit | 966165f9fc59b7cb839fcad3d4b825a4eaca1033 (patch) | |
tree | e0d341618856a7e439eecf44de51fa51deb23562 /src/device.c | |
parent | a3a22426303e048d58d0dcb907ce16e8ef92c624 (diff) | |
download | connman-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.c | 7 |
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; } |