drm/nouveau/devinit/nv50: return error code if pll calculation fails
authorBen Skeggs <bskeggs@redhat.com>
Mon, 16 Jan 2017 03:44:11 +0000 (13:44 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 17 Feb 2017 07:38:05 +0000 (17:38 +1000)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c

index c714b097719c0db243ca3d3c856a74eb4d2a03c6..59362f8dee2241a68013fe14dc0ddd27db00c3ba 100644 (file)
@@ -50,7 +50,7 @@ nv50_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
        ret = nv04_pll_calc(subdev, &info, freq, &N1, &M1, &N2, &M2, &P);
        if (!ret) {
                nvkm_error(subdev, "failed pll calculation\n");
-               return ret;
+               return -EINVAL;
        }
 
        switch (info.type) {