[arswitch] Break out of the loop upon any error, not just -1.

This fixes the AR9340 "unimplemented" thingy for now.
This commit is contained in:
Adrian Chadd 2018-02-05 05:51:37 +00:00
parent 286a5a1c7e
commit 7ed0831923
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328871

View File

@ -1187,7 +1187,7 @@ arswitch_atu_fetch_table(device_t dev, etherswitch_atu_table_t *table)
err = sc->hal.arswitch_atu_fetch_table(sc, NULL, 0);
/* fetch - ideally yes we'd fetch into a separate table then switch */
while (err != -1 && nitems < sc->atu.size) {
while (err == 0 && nitems < sc->atu.size) {
err = sc->hal.arswitch_atu_fetch_table(sc,
&sc->atu.entries[nitems], 1);
if (err == 0) {