drm/nouveau/devinit/nv50: return error code if pll calculation fails

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2017-01-16 13:44:11 +10:00
parent 0879683280
commit 9f1c4dbd3d

View 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) {