Bluetooth: Fix compiler warning with selftest duration calculation

CC      net/bluetooth/selftest.o
net/bluetooth/selftest.c: In function ‘bt_selftest_init’:
net/bluetooth/selftest.c:246:3: warning: ‘duration’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   snprintf(test_ecdh_buffer, sizeof(test_ecdh_buffer),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     "PASS (%llu usecs)\n", duration);
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/bluetooth/selftest.c:203:21: note: ‘duration’ was declared here
  unsigned long long duration;
                     ^~~~~~~~

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Marcel Holtmann 2017-10-06 20:42:45 +02:00 коммит произвёл Johan Hedberg
Родитель 0435605289
Коммит b49ef29d72
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -200,7 +200,7 @@ static int __init test_ecdh(void)
{ {
struct crypto_kpp *tfm; struct crypto_kpp *tfm;
ktime_t calltime, delta, rettime; ktime_t calltime, delta, rettime;
unsigned long long duration; unsigned long long duration = 0;
int err; int err;
calltime = ktime_get(); calltime = ktime_get();