[PATCH v3 7/8] android/pan: Pass error in nap_remove_bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't return EOPNOTSUPP but just pass error from errno.
---
 android/pan.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/android/pan.c b/android/pan.c
index 1cb82a1..418e2a4 100644
--- a/android/pan.c
+++ b/android/pan.c
@@ -146,10 +146,13 @@ static int nap_remove_bridge(void)
 		return -EOPNOTSUPP;
 
 	err = ioctl(sk, SIOCBRDELBR, BNEP_BRIDGE);
+	if (err < 0)
+		err = -errno;
+
 	close(sk);
 
 	if (err < 0)
-		return -EOPNOTSUPP;
+		return err;
 
 	nap_dev.bridge = false;
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux