artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53e55b6
)
drm/amd/pm: Prevent divide by zero
author
jsg
<jsg@openbsd.org>
Fri, 22 Jul 2022 06:19:59 +0000
(06:19 +0000)
committer
jsg
<jsg@openbsd.org>
Fri, 22 Jul 2022 06:19:59 +0000
(06:19 +0000)
From Yefim Barashkin
8c37e7a2000d795aaad7256950f43c25f2aac67f
in linux 5.15.y/5.15.56
0638c98c17aa12fe914459c82cd178247e21fb2b
in mainline linux
sys/dev/pci/drm/amd/pm/swsmu/smu11/smu_v11_0.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/pm/swsmu/smu11/smu_v11_0.c
b/sys/dev/pci/drm/amd/pm/swsmu/smu11/smu_v11_0.c
index
2aef862
..
244b413
100644
(file)
--- a/
sys/dev/pci/drm/amd/pm/swsmu/smu11/smu_v11_0.c
+++ b/
sys/dev/pci/drm/amd/pm/swsmu/smu11/smu_v11_0.c
@@
-1235,6
+1235,8
@@
int smu_v11_0_set_fan_speed_rpm(struct smu_context *smu,
uint32_t crystal_clock_freq = 2500;
uint32_t tach_period;
+ if (speed == 0)
+ return -EINVAL;
/*
* To prevent from possible overheat, some ASICs may have requirement
* for minimum fan speed: