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: Manjunatha Madana <quic_c_mamanj@quicinc.com>
This commit is contained in:
parent
70eb2136c8
commit
7d7f154f68
1 changed files with 2 additions and 2 deletions
|
|
@ -424,7 +424,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;
|
||||
|
||||
mutex_lock(&drvdata->mem_lock);
|
||||
|
|
@ -526,7 +526,7 @@ static ssize_t mem_type_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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue