[PATCH] drm/nouveau/iccsense:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixed error: 'do not use assignment in if condition'

This patch fixes error: 'do not use assignment in if condition'
in drm/nouveau/iccsense

Signed-off-by: Ran Sun <sunran001@xxxxxxxxxx>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
index 8f0ccd3664eb..2428f3d6e477 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
@@ -322,7 +322,8 @@ int
nvkm_iccsense_new_(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
            struct nvkm_iccsense **iccsense)
 {
-    if (!(*iccsense = kzalloc(sizeof(**iccsense), GFP_KERNEL)))
+    *iccsense = kzalloc(sizeof(**iccsense), GFP_KERNEL);
+    if (!*iccsense)
         return -ENOMEM;
     INIT_LIST_HEAD(&(*iccsense)->sensors);
     INIT_LIST_HEAD(&(*iccsense)->rails);



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux