Bluetooth: SMP: Fix ecc_make_key return code check

This function returns TC_FAIL and not negative value on failure.

Change-Id: I36e51e39aca07264339fc6c10a9c2b8db61b580d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2016-05-11 15:30:44 +02:00 committed by Johan Hedberg
commit 1fefa34e08

View file

@ -3605,7 +3605,7 @@ static bool le_sc_supported(void)
return false;
}
if (ecc_make_key(&pkey, sc_private_key, random) < 0) {
if (ecc_make_key(&pkey, sc_private_key, random) == TC_FAIL) {
BT_ERR("Failed to create ECC public/private pair");
return false;