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

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

Merge "drivers: soc: qcom: rimps_memlat: free attribute pointer"

parents d6ba2746 a2bf9edd
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ static ssize_t show_cur_freq(struct kobject *kobj, char *buf)
	return count;
}

static ssize_t show_available_freq(struct kobject *kobj, char *buf)
static ssize_t show_available_frequencies(struct kobject *kobj, char *buf)
{
	struct memlat_mon *mon = to_memlat_mon(kobj);
	u32 i = 0;
@@ -339,7 +339,9 @@ static ssize_t show_available_freq(struct kobject *kobj, char *buf)

	if (mon->mon_type == L3_MEMLAT) {
		for (i = 0; i <= l3_pstates; i++)
			tmp += scnprintf(tmp, PAGE_SIZE, "%u\n", l3_freqs[i]);
			tmp += scnprintf(tmp, PAGE_SIZE, "%u ", l3_freqs[i]);

		tmp += scnprintf(tmp, PAGE_SIZE, "\n");
	}
	return (tmp - buf);
}
@@ -421,7 +423,7 @@ memlat_mon_attr_rw(l2wb_pct);
memlat_mon_attr_rw(l2wb_filter);
memlat_mon_attr_rw(log_level);
memlat_mon_attr_ro(cur_freq);
memlat_mon_attr_ro(available_freq);
memlat_mon_attr_ro(available_frequencies);

static struct attribute *mon_dev_attr[] = {
	&ratio_ceil.attr,
@@ -432,7 +434,7 @@ static struct attribute *mon_dev_attr[] = {
	&l2wb_pct.attr,
	&l2wb_filter.attr,
	&cur_freq.attr,
	&available_freq.attr,
	&available_frequencies.attr,
	NULL,
};

@@ -534,6 +536,7 @@ static int setup_common_pmu_events(struct memlat_cpu_grp *cpu_grp,
			pmu[STALL_IDX].hw_cntr_idx = INVALID_PMU_HW_IDX;
		}
	}
	kfree(attr);
	return 0;
}

@@ -602,6 +605,7 @@ static int setup_mon_pmu_events(struct memlat_mon *mon,
			pmu[L3_ACCESS_IDX].hw_cntr_idx = INVALID_PMU_HW_IDX;
		}
	}
	kfree(attr);
	return 0;
}