[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0d8628f4-7254-2600-9ee4-e72b4e0ee6f6@users.sourceforge.net>
Date: Wed, 21 Sep 2016 09:28:00 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
Ben Skeggs <bskeggs@...hat.com>,
David Airlie <airlied@...ux.ie>,
Martin Peres <martin.peres@...e.fr>,
Roy Spliet <rspliet@...ipso.eu>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org, trivial@...nel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 4/5] GPU-DRM-nouveau: Adjust a kzalloc() call in
gt215_ram_new()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 21 Sep 2016 08:44:38 +0200
The script "checkpatch.pl" can point out that assignments should usually
not be performed within condition checks.
Thus move the assignment for one local variable to a separate statement
in this function.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
index cb50539..edbe8e4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
@@ -940,7 +940,8 @@ gt215_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct gt215_ram *ram;
int ret, i;
- if (!(ram = kzalloc(sizeof(*ram), GFP_KERNEL)))
+ ram = kzalloc(sizeof(*ram), GFP_KERNEL);
+ if (!ram)
return -ENOMEM;
*pram = &ram->base;
--
2.10.0
Powered by blists - more mailing lists