Skip to content

Commit

Permalink
drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Ben Skeggs committed Feb 1, 2012
1 parent 525895b commit a9d9938
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/nouveau/nv50_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a9d9938

Please sign in to comment.