diff options
author | Bernard Zhao <bernard@vivo.com> | 2020-04-26 06:12:44 -0700 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-04-30 16:48:42 -0400 |
commit | 981d4f7d2c0dc5bc7d42e7f4afee1e6ded5a9cb3 (patch) | |
tree | a398eff1c7a5b0a543ac236bdeca1121e3a9c7a3 | |
parent | 439657970c1d2ee313a9deee296230e7d6cbd3b0 (diff) | |
download | lwn-981d4f7d2c0dc5bc7d42e7f4afee1e6ded5a9cb3.tar.gz lwn-981d4f7d2c0dc5bc7d42e7f4afee1e6ded5a9cb3.zip |
drm/radeon: cleanup coding style a bit
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>
-rw-r--r-- | drivers/gpu/drm/radeon/atom.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 2c27627b6659..f15b20da5315 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -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; } |