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

Commit faab157e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mfd: wcd9xxx-core: Fix array size"

parents e0d9fd70 4440ea53
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1689,11 +1689,12 @@ static ssize_t wcd9xxx_slimslave_reg_show(char __user *ubuf, size_t count,
{
	int i, reg_val, len;
	ssize_t total = 0;
	char tmp_buf[20]; /* each line is 12 bytes but 20 for margin of error */
	char tmp_buf[25]; /* each line is 12 bytes but 25 for margin of error */

	for (i = (int) *ppos / 12; i <= SLIM_MAX_REG_ADDR; i++) {
		reg_val = wcd9xxx_interface_reg_read(debugCodec, i);
		len = snprintf(tmp_buf, 25, "0x%.3x: 0x%.2x\n", i, reg_val);
		len = snprintf(tmp_buf, sizeof(tmp_buf),
			"0x%.3x: 0x%.2x\n", i, reg_val);

		if ((total + len) >= count - 1)
			break;