From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> The second 'err' shadows the main local variable which is being used to as return value of the function. Otherwise -ENOENT was always returned in case of error. --- src/device.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/device.c b/src/device.c index 5f67610..18beed9 100644 --- a/src/device.c +++ b/src/device.c @@ -1060,8 +1060,6 @@ static int connect_next(struct btd_device *dev) int err = -ENOENT; while (dev->pending) { - int err; - profile = dev->pending->data; err = profile->connect(dev, profile); -- 1.8.1.4 -- 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