util: resource: Fix type check errors 57/272157/1
authorDongwoo Lee <dwoo08.lee@samsung.com>
Thu, 10 Mar 2022 07:16:23 +0000 (16:16 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Thu, 10 Mar 2022 08:02:12 +0000 (17:02 +0900)
Change-Id: Ie4f3a00893aa4c3a87c5e83eb763135efc965cf1
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
src/util/resource.c

index 280c2f9..535148a 100644 (file)
@@ -324,7 +324,7 @@ int get_resource_attr_int64(struct resource *resource, u_int64_t attr_id, int64_
 {
        struct resource_attribute_value *attr_value = NULL;
 
-       if (!check_attr_validate(resource, attr_id, DATA_TYPE_INT))
+       if (!check_attr_validate(resource, attr_id, DATA_TYPE_INT64))
                return -EINVAL;
 
        attr_value = get_resource_attr_value(resource, attr_id);
@@ -340,7 +340,7 @@ int get_resource_attr_uint(struct resource *resource, u_int64_t attr_id, u_int32
 {
        struct resource_attribute_value *attr_value = NULL;
 
-       if (!check_attr_validate(resource, attr_id, DATA_TYPE_INT))
+       if (!check_attr_validate(resource, attr_id, DATA_TYPE_UINT))
                return -EINVAL;
 
        attr_value = get_resource_attr_value(resource, attr_id);
@@ -356,7 +356,7 @@ int get_resource_attr_uint64(struct resource *resource, u_int64_t attr_id, u_int
 {
        struct resource_attribute_value *attr_value = NULL;
 
-       if (!check_attr_validate(resource, attr_id, DATA_TYPE_INT))
+       if (!check_attr_validate(resource, attr_id, DATA_TYPE_UINT64))
                return -EINVAL;
 
        attr_value = get_resource_attr_value(resource, attr_id);