missed a return of result

This commit is contained in:
Jake Dahl 2018-10-09 10:08:05 -06:00 committed by Beat Küng
parent b2482b0e43
commit 1e1268f84b

View File

@ -127,14 +127,12 @@ int SMBus::block_write(const uint8_t cmd_code, void *data, uint8_t byte_count, b
if (i == 10) {
PX4_WARN("Block_write failed 10 times");
result = -ENODATA;
}
} else {
return PX4_OK;
}
}
return PX4_ERROR;
return result;
}
uint8_t SMBus::get_pec(uint8_t *buff, const uint8_t len)