lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4a21bb7bb79108ae96518a8d1372ef1d@208suo.com>
Date:   Tue, 11 Jul 2023 11:43:38 +0800
From:   sunran001@...suo.com
To:     airlied@...il.com, daniel@...ll.ch
Cc:     dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] drm/nouveau/flcn/qmgr: Move assignment outside if condition

Fixes the following checkpatch errors:

ERROR: do not use assignment in if condition

Signed-off-by: Ran Sun <sunran001@...suo.com>
---
  drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c 
b/drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
index a453de341a75..48abdb124326 100644
--- a/drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
+++ b/drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
@@ -73,7 +73,8 @@ nvkm_falcon_qmgr_new(struct nvkm_falcon *falcon,
      struct nvkm_falcon_qmgr *qmgr;
      int i;

-    if (!(qmgr = *pqmgr = kzalloc(sizeof(*qmgr), GFP_KERNEL)))
+    qmgr = *pqmgr = kzalloc(sizeof(*qmgr), GFP_KERNEL);
+    if (!qmgr)
          return -ENOMEM;

      qmgr->falcon = falcon;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ