projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a5f985
)
drm/nouveau/pm: avoid potential divide-by-zero
author
Ben Skeggs
<bskeggs@redhat.com>
Mon, 23 Jan 2012 02:58:33 +0000
(12:58 +1000)
committer
Ben Skeggs
<bskeggs@redhat.com>
Tue, 13 Mar 2012 07:06:53 +0000
(17:06 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
drivers/gpu/drm/nouveau/nouveau_pm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nouveau_pm.c
b/drivers/gpu/drm/nouveau/nouveau_pm.c
index
08c563d
..
6e3851e
100644
(file)
--- a/
drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/
drivers/gpu/drm/nouveau/nouveau_pm.c
@@
-50,7
+50,7
@@
nouveau_pwmfan_get(struct drm_device *dev)
ret = nouveau_gpio_find(dev, 0, DCB_GPIO_PWM_FAN, 0xff, &gpio);
if (ret == 0) {
ret = pm->pwm_get(dev, gpio.line, &divs, &duty);
- if (ret == 0) {
+ if (ret == 0
&& divs
) {
divs = max(divs, duty);
if (dev_priv->card_type <= NV_40 || (gpio.log[0] & 1))
duty = divs - duty;