From: Dan Carpenter Date: Wed, 4 Jan 2012 07:20:47 +0000 (+0300) Subject: drm/nv50/pm: signedness bug in nv50_pm_clocks_pre() X-Git-Tag: firefly_0821_release~3680^2~3590^2~6^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a9d993882008a1ae2c953064f0c2ca7e604b1333;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Dan Carpenter Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c b/drivers/gpu/drm/nouveau/nv50_pm.c index 03937212e9d8..ec5481dfcd82 100644 --- a/drivers/gpu/drm/nouveau/nv50_pm.c +++ b/drivers/gpu/drm/nouveau/nv50_pm.c @@ -495,9 +495,9 @@ nv50_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl) struct drm_nouveau_private *dev_priv = dev->dev_private; struct nv50_pm_state *info; struct pll_lims pll; - int ret = -EINVAL; + int clk, ret = -EINVAL; int N, M, P1, P2; - u32 clk, out; + u32 out; if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac)