projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aec1d87
)
drm/amd/pm: correct string parsing for extra separator characters case
author
Evan Quan
<evan.quan@amd.com>
Thu, 21 Jan 2021 08:24:02 +0000
(16:24 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Mon, 1 Feb 2021 16:51:46 +0000
(11:51 -0500)
Supplement of previous fix.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index
bbfb966
..
0d37c84
100644
(file)
--- a/
drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/
drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@
-1870,6
+1870,8
@@
static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev,
memcpy(buf_cpy, buf, count-i);
tmp_str = buf_cpy;
while ((sub_str = strsep(&tmp_str, delimiter)) != NULL) {
+ if (strlen(sub_str) == 0)
+ continue;
ret = kstrtol(sub_str, 0, ¶meter[parameter_size]);
if (ret)
return -EINVAL;