missed a return of result

This commit is contained in:
Jake Dahl
2018-10-16 09:45:28 +02:00
committed by Beat Küng
parent b2482b0e43
commit 1e1268f84b
+2 -4
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) { 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)