[Nouveau] [PATCH] fuse/gm107: simplify the return logic

Martin Peres martin.peres at free.fr
Sun Jan 25 11:35:44 PST 2015


Spotted by coccinelle:
drivers/gpu/drm/nouveau/core/subdev/fuse/gm107.c:50:5-8: WARNING: end returns can be simpified

Signed-off-by: Martin Peres <martin.peres at free.fr>
---
 drm/nouveau/nvkm/subdev/fuse/gm107.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drm/nouveau/nvkm/subdev/fuse/gm107.c b/drm/nouveau/nvkm/subdev/fuse/gm107.c
index ba19158..0b256aa 100644
--- a/drm/nouveau/nvkm/subdev/fuse/gm107.c
+++ b/drm/nouveau/nvkm/subdev/fuse/gm107.c
@@ -45,10 +45,8 @@ gm107_fuse_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
 
 	ret = nvkm_fuse_create(parent, engine, oclass, &priv);
 	*pobject = nv_object(priv);
-	if (ret)
-		return ret;
 
-	return 0;
+	return ret;
 }
 
 struct nvkm_oclass
-- 
2.2.2



More information about the Nouveau mailing list