If no clocks are present in devicetree, ensure that smmu->num_clocks is
set to zero instead of an error value.
Change-Id: Ibc3ede250419dd0235f3aa481218e3a91cdb3630
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
smmu->num_clocks =
of_property_count_strings(dev->of_node, "clock-names");
- if (smmu->num_clocks < 1)
+ if (smmu->num_clocks < 1) {
+ smmu->num_clocks = 0;
return 0;
+ }
smmu->clocks = devm_kzalloc(
dev, sizeof(*smmu->clocks) * smmu->num_clocks,