Skip to contentSkip to conversation

drm: nouveau: lsfw: cleanup coccinelle warning

PATCH New Qing Wang 1 participant 1 message Dec 23, 2021

Subsystems (3)
lore
Share & tools
lore

Qing Wang

author
#0 lore raw

PATCH v2 1/1 drm: nouveau: lsfw: cleanup coccinelle warning

From: Wang Qing <[email protected]>

odd_ptr_err.cocci has complained about this warning for a long time:
lsfw.c:194:5-11: inconsistent IS_ERR and PTR_ERR on line 195.

Although there is no actual impact, it can improve scanning efficiency.

---
 drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c +2 -1
index 9b1cf67..0f70d14
@@ -191,7 +191,8 @@ nvkm_acr_lsfw_load_bl_inst_data_sig(struct nvkm_subdev *subdev,
 	u32 *bldata;
 	int ret;
 
-	if (IS_ERR((lsfw = nvkm_acr_lsfw_add(func, acr, falcon, id))))
+	lsfw = nvkm_acr_lsfw_add(func, acr, falcon, id);
+	if (IS_ERR(lsfw))
 		return PTR_ERR(lsfw);
 
 	ret = nvkm_firmware_load_name(subdev, path, "bl", ver, &bl);
Signature · 1 line
2.7.4