block if (n_tries >= 5) {...} probably should be first in while-loop-scope (edit: with change ret from ERR_BADBIND to ERR_NOTBIND in that case?) ,
otherwise we perform aply-block 6 times and rollbak-block 5 times...?
static int
update_driver(HDEVINFO dev_info, PSP_DEVINFO_DATA pdev_info_data)
{
...
while (TRUE) {
ret = apply_driver(inst_id, TRUE, &need_reboot);
if (ret == 0 && !need_reboot)
break;
if (n_tries >= 5) {
...
break;
}
n_tries++;
if (apply_driver(inst_id, FALSE, NULL) != 0) {
...
break;
}
}
...
}
block
if (n_tries >= 5) {...}
probably should be first in while-loop-scope (edit: with change ret from ERR_BADBIND to ERR_NOTBIND in that case?) , otherwise we perform aply-block 6 times and rollbak-block 5 times...?