OSDN Git Service

drm/radeon: cleanup coding style a bit
authorBernard Zhao <bernard@vivo.com>
Sun, 26 Apr 2020 13:12:44 +0000 (06:12 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Apr 2020 20:48:42 +0000 (16:48 -0400)
Maybe no need to check ws before kmalloc, kmalloc will check
itself, kmalloc`s logic is if ptr is NULL, kmalloc will just
return

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/atom.c

index 2c27627..f15b20d 100644 (file)
@@ -1211,8 +1211,7 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32
        SDEBUG("<<\n");
 
 free:
-       if (ws)
-               kfree(ectx.ws);
+       kfree(ectx.ws);
        return ret;
 }