summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hcid/dbus-hci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index d0b6b59c..6e4b897e 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -2278,9 +2278,7 @@ void hcid_dbus_setname_complete(bdaddr_t *local)
error("Sending getting name command failed: %s (%d)",
strerror(errno), errno);
rp.name[0] = '\0';
- }
-
- if (rp.status) {
+ } else if (rp.status) {
error("Getting name failed with status 0x%02x",
rp.status);
rp.name[0] = '\0';