*/
static int aice_init(void)
{
- if (ERROR_OK != aice_port->api->open(¶m)) {
+ if (aice_port->api->open(¶m) != ERROR_OK) {
LOG_ERROR("Cannot find AICE Interface! Please check "
"connection and permissions.");
return ERROR_JTAG_INIT_FAILED;
int i;
for (i = 0 ; i < AICE_KHZ_TO_SPEED_MAP_SIZE ; i++) {
if (khz == aice_khz_to_speed_map[i]) {
- if (8 <= i)
+ if (i >= 8)
*jtag_speed = i | AICE_TCK_CONTROL_TCK3048;
else
*jtag_speed = i;