resource-manager: Fix bug of set_resource_attr_value_data() 21/296621/3
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 2 Aug 2023 07:57:51 +0000 (16:57 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 2 Aug 2023 10:10:52 +0000 (19:10 +0900)
It must check existence of setter instead of getter.

Change-Id: I1e34647390257ba1ac0c580b35bf1934eeb10d18
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/resource-manager/resource-manager.c

index 03737cb31c4d6e292a91ab9c94c18136ee1c8730..c1662d625a3c2f2315f7230da845cbdfb63a28f7 100644 (file)
@@ -1256,7 +1256,7 @@ set_resource_attr_value_data(struct syscommon_resman_resource *resource,
                return -EINVAL;
 
        attr = get_resource_attr(resource, attr_id);
-       if (!attr || !attr->ops.get)
+       if (!attr || !attr->ops.set)
                return -EINVAL;
 
        attr_value = get_resource_attr_value(resource, attr_id);