mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 10:23:33 +08:00
missed a return of result
This commit is contained in:
@@ -127,14 +127,12 @@ int SMBus::block_write(const uint8_t cmd_code, void *data, uint8_t byte_count, b
|
|||||||
|
|
||||||
if (i == 10) {
|
if (i == 10) {
|
||||||
PX4_WARN("Block_write failed 10 times");
|
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)
|
uint8_t SMBus::get_pec(uint8_t *buff, const uint8_t len)
|
||||||
|
|||||||
Reference in New Issue
Block a user