drm/nouveau/gr/gf100-: don't prevent module load if firmware missing
authorBen Skeggs <bskeggs@redhat.com>
Tue, 31 Oct 2017 17:56:20 +0000 (03:56 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 2 Nov 2017 03:32:34 +0000 (13:32 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

index 4b3d5432a53e2053249700a61b131290737d8146..2f8dc107047dc8c14b91f60af01304f189ce68c1 100644 (file)
@@ -1861,8 +1861,12 @@ gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname,
        int ret;
 
        ret = nvkm_firmware_get(device, fwname, &fw);
-       if (ret)
-               return gf100_gr_ctor_fw_legacy(gr, fwname, fuc, ret);
+       if (ret) {
+               ret = gf100_gr_ctor_fw_legacy(gr, fwname, fuc, ret);
+               if (ret)
+                       return -ENODEV;
+               return 0;
+       }
 
        fuc->size = fw->size;
        fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL);