I do not understand this test and I do not know where the 126 value comes from.

The next test is ```preferred > CARDOS_PIN_ID_MAX``` and ```CARDOS_PIN_ID_MAX``` value is 15.
I think your patch is safe.

The code could be simplified or made more explicit but that is another task.