]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix warning of potentially uninitialized adv_instance variable
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 18 Jun 2015 18:05:31 +0000 (21:05 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 18 Jun 2015 18:05:31 +0000 (21:05 +0300)
commite00894fc944d06d0151c2010e5f346179ed42662
tree7bd7066d0ae89dbca382ed83b688c1293f0e82df
parentcec3cee6dd1e6a8050ade546147221a8ae88f601
Bluetooth: Fix warning of potentially uninitialized adv_instance variable

Rework the logic of checking for a valid adv_instance for non-zero
cp->instance values. Without this change we may get (false positive)
warnings as follows:

>> net/bluetooth/mgmt.c:7294:29: warning: 'adv_instance' may be used
uninitialized in this function [-Wuninitialized]

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c