Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8d7acb6 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: mem-offline: Fix klocwork errors"

parents 79eb59e5 aa4d4815
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -324,10 +324,14 @@ static int mem_parse_dt(struct platform_device *pdev)
	struct device_node *node = pdev->dev.of_node;

	val = of_get_property(node, "granule", NULL);
	if (!val && !*val) {
	if (!val) {
		pr_err("mem-offine: granule property not found in DT\n");
		return -EINVAL;
	}
	if (!*val) {
		pr_err("mem-offine: invalid granule property\n");
		return -EINVAL;
	}
	offline_granule = be32_to_cpup(val);
	if (!offline_granule && !(offline_granule & (offline_granule - 1)) &&
			offline_granule * SZ_1M < MIN_MEMORY_BLOCK_SIZE) {