Check data type lower bound when creating a tensor

As underlying enum type can be an int we check also the lower bound of
the data type when creating a tensor to avoid creation with negative
values.

Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I00fa3cae988c5f20a56115b1c1b85b70e699c966
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5413
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/c/AclTensor.cpp b/src/c/AclTensor.cpp
index 58b17ff..0d884b1 100644
--- a/src/c/AclTensor.cpp
+++ b/src/c/AclTensor.cpp
@@ -38,7 +38,7 @@
  */
 bool is_desc_valid(const AclTensorDescriptor &desc)
 {
-    if(desc.data_type > AclFloat32)
+    if(desc.data_type > AclFloat32 || desc.data_type <= AclDataTypeUnknown)
     {
         ARM_COMPUTE_LOG_ERROR_ACL("[AclCreateTensor]: Unknown data type!");
         return false;