Martin Peres
2015-Jan-25 19:35 UTC
[Nouveau] [PATCH] fuse/gm107: simplify the return logic
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
Tobias Klausmann
2015-Jan-25 19:41 UTC
[Nouveau] [PATCH] fuse/gm107: simplify the return logic
On 25.01.2015 20:35, Martin Peres wrote:> 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_oclassReviewed-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> If it is helping :)
Seemingly Similar Threads
- [PATCH 1/3] subdev: add a pfuse subdev
- [PATCH] devinit/gf100-: detect if BIOS invoked devinit
- [PATCH 1/3] subdev: add a pfuse subdev
- [PATCH 2/3] drm/nouveau: mark symbols static where possible
- [Bug 90054] New: white screen reboot on gm107 with multiple monitors