[Nouveau] [PATCH] gr: fixup for legacy paths firmware lookup

Alexandre Courbot gnurou at gmail.com
Mon Nov 7 01:41:26 UTC 2016


The code would print a NULL string if no legacy firmware was found.

Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
Reported-by: Peter Wu <peter at lekensteyn.nl>
---
Hi Ben,

Sorry about the obvious mistake (and thanks Peter for reporting it!). You
may want to squash this one into the previous patch if there still is time.

 drm/nouveau/nvkm/engine/gr/gf100.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drm/nouveau/nvkm/engine/gr/gf100.c b/drm/nouveau/nvkm/engine/gr/gf100.c
index ed45f92..60a1b5c 100644
--- a/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -1773,11 +1773,8 @@ gf100_gr_ctor_fw_legacy(struct gf100_gr *gr, const char *fwname,
 		fwname = "fuc41ac";
 	else if (!strcmp(fwname, "gpccs_data"))
 		fwname = "fuc41ad";
-	else
-		fwname = NULL;
-
-	/* nope, let's just return the error we got */
-	if (!fwname) {
+	else {
+		/* nope, let's just return the error we got */
 		nvkm_error(subdev, "failed to load %s\n", fwname);
 		return ret;
 	}
-- 
2.10.1



More information about the Nouveau mailing list