Bluetooth: Fix unnecessary list traversal in mgmt_pending_remove
authorJohan Hedberg <johan.hedberg@nokia.com>
Sat, 19 Feb 2011 15:06:02 +0000 (12:06 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 21 Feb 2011 20:22:45 +0000 (17:22 -0300)
commita664b5bc77fbc80c163de5606114659d3cbeb043
tree4cf0b60af8a38ea3f1d8a00caf4d82289333b680
parenta958355699dd90ba69951bdf55dda00e3e97222c
Bluetooth: Fix unnecessary list traversal in mgmt_pending_remove

All of the places that need to call mgmt_pending_remove already have a
pointer to the pending command, so searching for the command in the list
doesn't make sense. The added benefit is that many places that
previously had to call list_del + mgmt_pending_free can just call
mgmt_pending_remove now.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/mgmt.c