Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()

calc_mclk() returns zero on success and negative on failure but clk is
a u32.

v2: Martin Peres:
- clk should be an int, not a u32

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

authored by

Dan Carpenter and committed by
Ben Skeggs
a9d99388 525895ba

+2 -2
+2 -2
drivers/gpu/drm/nouveau/nv50_pm.c
··· 495 495 struct drm_nouveau_private *dev_priv = dev->dev_private; 496 496 struct nv50_pm_state *info; 497 497 struct pll_lims pll; 498 - int ret = -EINVAL; 498 + int clk, ret = -EINVAL; 499 499 int N, M, P1, P2; 500 - u32 clk, out; 500 + u32 out; 501 501 502 502 if (dev_priv->chipset == 0xaa || 503 503 dev_priv->chipset == 0xac)