Diff between 11ddc90c92351d1e311b4dd69b348fc4135b9480 and e327f964cec1972bbbfc8517c64243f0b7a5c1b3

Changed Files

File Additions Deletions Status
src/adapter.c +2 -2 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index 7a5f7b3..7d0c63e 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3405,7 +3405,7 @@ int btd_adapter_switch_online(struct btd_adapter *adapter)
 		return -EINVAL;
 
 	if (adapter->up)
-		return 0;
+		return -EALREADY;
 
 	if (adapter->off_timer)
 		off_timer_remove(adapter);
@@ -3419,7 +3419,7 @@ int btd_adapter_switch_offline(struct btd_adapter *adapter)
 		return -EINVAL;
 
 	if (!adapter->up)
-		return 0;
+		return -EALREADY;
 
 	if (adapter->off_timer)
 		return 0;