drivers: hwinfo: Remove invalid comparison

size_t is never lesser than zero. Just remove it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-03-24 22:59:39 -07:00 committed by Anas Nashif
commit 6771f7bb90

View file

@ -20,7 +20,7 @@ ssize_t z_impl_hwinfo_get_device_id(uint8_t *buffer, size_t length)
return 0;
}
if (length > DT_INST_REG_SIZE(0) || length < 0) {
if (length > DT_INST_REG_SIZE(0)) {
length = DT_INST_REG_SIZE(0);
}