adiv5: Fix some nomenclature in adiv5_dp_init()

This commit is contained in:
dragonmux 2022-07-26 05:27:54 +01:00 committed by Piotr Esden-Tempski
parent 733d8ddc19
commit ce37d4e833
1 changed files with 3 additions and 3 deletions

View File

@ -772,9 +772,9 @@ void adiv5_dp_init(ADIv5_DP_t *dp)
/* Probe for APs on this DP */
uint32_t last_base = 0;
size_t void_aps = 0;
size_t invalid_aps = 0;
dp->refcnt++;
for (size_t i = 0; i < 256 && void_aps < 8; ++i) {
for (size_t i = 0; i < 256 && invalid_aps < 8; ++i) {
ADIv5_AP_t *ap = NULL;
#if PC_HOSTED == 1
if ((!dp->ap_setup) || dp->ap_setup(i))
@ -787,7 +787,7 @@ void adiv5_dp_init(ADIv5_DP_t *dp)
if (dp->ap_cleanup)
dp->ap_cleanup(i);
#endif
if (++void_aps == 8) {
if (++invalid_aps == 8) {
adiv5_dp_unref(dp);
return;
}