From: Glenn Ruben Bakke Date: Wed, 17 Jun 2015 14:32:23 +0000 (-0700) Subject: Bluetooth: 6lowpan: Enable delete_netdev to be scheduled when last peer is deleted X-Git-Tag: v4.14-rc1~5205^2~29^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2105ae1de117e17522d37b6dedb1f286c544160;p=platform%2Fkernel%2Flinux-rpi.git Bluetooth: 6lowpan: Enable delete_netdev to be scheduled when last peer is deleted This patch fixes an issue with the netdev not being unregistered when the last peer is deleted. Removing the logical negation operator on the boolean solves this issue. If the last peer is removed the condition will be true, and the delete_netdev() is scheduled. Signed-off-by: Lukasz Duda Signed-off-by: Glenn Ruben Bakke Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index f3d6046..3edc731 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -977,7 +977,7 @@ static void chan_close_cb(struct l2cap_chan *chan) ifdown(dev->netdev); - if (!removed) { + if (removed) { INIT_WORK(&entry->delete_netdev, delete_netdev); schedule_work(&entry->delete_netdev); }