mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: sunran001@208suo.com
To: airlied@gmail.com, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] drm/nouveau/flcn/cmdq: Move assignment outside if condition
Date: Tue, 11 Jul 2023 13:54:55 +0800	[thread overview]
Message-ID: <f5b217c2420c2948bd402e8e36e391a3@208suo.com> (raw)
In-Reply-To: <20230711055304.79441-1-xujianghui@cdjrlc.com>

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/falcon/cmdq.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c 
b/drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
index 211ebe7afac6..a8beb55097a6 100644
--- a/drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
+++ b/drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
@@ -203,7 +203,8 @@ nvkm_falcon_cmdq_new(struct nvkm_falcon_qmgr *qmgr, 
const char *name,
  {
      struct nvkm_falcon_cmdq *cmdq = *pcmdq;

-    if (!(cmdq = *pcmdq = kzalloc(sizeof(*cmdq), GFP_KERNEL)))
+    cmdq = *pcmdq = kzalloc(sizeof(*cmdq), GFP_KERNEL);
+    if (!cmdq)
          return -ENOMEM;

      cmdq->qmgr = qmgr;

           reply	other threads:[~2023-07-11  5:55 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230711055304.79441-1-xujianghui@cdjrlc.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5b217c2420c2948bd402e8e36e391a3@208suo.com \
    --to=sunran001@208suo.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®