drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Jan 2012 07:20:47 +0000 (10:20 +0300)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 1 Feb 2012 05:27:43 +0000 (15:27 +1000)
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>
drivers/gpu/drm/nouveau/nv50_pm.c

index 03937212e9d81c97a3595e269cadc13c0f4eea97..ec5481dfcd82ed9ce3aaca764ac0471bfb9eb52f 100644 (file)
@@ -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)