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

Commit e2a3c4c0 authored by Manjunatha Madana's avatar Manjunatha Madana Committed by Georg Veichtlbauer
Browse files

coresight: Fix clang 14.x forbidden warnings/errors



Fix the sscanf overflow on the destination argument without
the specifier.

Change-Id: Iffc4967b1e11b3a91c97416cedc411a00b9bfc3b
Signed-off-by: default avatarManjunatha Madana <quic_c_mamanj@quicinc.com>
parent 77253b3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -430,7 +430,7 @@ static ssize_t out_mode_store(struct device *dev,

	if (strlen(buf) >= 10)
		return -EINVAL;
	if (sscanf(buf, "%10s", str) != 1)
	if (sscanf(buf, "%s", str) != 1)
		return -EINVAL;
	ret = tmc_etr_switch_mode(drvdata, str);
	return ret ? ret : size;
@@ -455,7 +455,7 @@ static ssize_t pcie_path_store(struct device *dev,

	if (strlen(buf) >= 10)
		return -EINVAL;
	if (sscanf(buf, "%10s", str) != 1)
	if (sscanf(buf, "%s", str) != 1)
		return -EINVAL;

	mutex_lock(&drvdata->mem_lock);