summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/base/power/domain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index aac656a889dc..661737c2bae0 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2113,7 +2113,7 @@ int of_genpd_parse_idle_states(struct device_node *dn,
struct of_phandle_iterator it;
count = of_count_phandle_with_args(dn, "domain-idle-states", NULL);
- if (!count)
+ if (count <= 0)
return -EINVAL;
st = kcalloc(count, sizeof(*st), GFP_KERNEL);