* [Nouveau] [PATCH] drm/nouveau/clk: Move assignment outside if condition
[not found] <20230711032005.78965-1-xujianghui@cdjrlc.com>
@ 2023-07-11 3:21 ` sunran001
0 siblings, 0 replies; only message in thread
From: sunran001 @ 2023-07-11 3:21 UTC (permalink / raw
To: airlied, daniel; +Cc: nouveau, linux-kernel, dri-devel
Fixes the following checkpatch errors:
ERROR: do not use assignment in if condition
Signed-off-by: Ran Sun <sunran001@208suo.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c
b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c
index f85d6a08c61a..77465bfa71ea 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c
@@ -414,7 +414,8 @@ mcp77_clk_new(struct nvkm_device *device, enum
nvkm_subdev_type type, int inst,
{
struct mcp77_clk *clk;
- if (!(clk = kzalloc(sizeof(*clk), GFP_KERNEL)))
+ clk = kzalloc(sizeof(*clk), GFP_KERNEL);
+ if (!clk)
return -ENOMEM;
*pclk = &clk->base;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-11 3:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230711032005.78965-1-xujianghui@cdjrlc.com>
2023-07-11 3:21 ` [Nouveau] [PATCH] drm/nouveau/clk: Move assignment outside if condition sunran001
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).