From 6771f7bb90dfc3108b61c26af3f906f753c812c3 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Wed, 24 Mar 2021 22:59:39 -0700 Subject: [PATCH] drivers: hwinfo: Remove invalid comparison size_t is never lesser than zero. Just remove it. Signed-off-by: Flavio Ceolin --- drivers/hwinfo/hwinfo_sam4l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwinfo/hwinfo_sam4l.c b/drivers/hwinfo/hwinfo_sam4l.c index 25719be054d..d542209a20c 100644 --- a/drivers/hwinfo/hwinfo_sam4l.c +++ b/drivers/hwinfo/hwinfo_sam4l.c @@ -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); }