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