From c47c31df01f28e75b183fceeb120b5dc78544e5c Mon Sep 17 00:00:00 2001 From: Mikel Astiz Date: Fri, 26 Apr 2013 08:16:57 +0200 Subject: [PATCH] device: Fix returned error code 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 5f6761085..18beed9e5 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); -- 2.47.3