diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-27 17:37:11 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-07-04 07:44:24 -0400 |
commit | 69e0393a0e1eb8b30adda89a79556499b0c5cb82 (patch) | |
tree | 03770ae4e94c88577967f1b6b4574fe2b484f252 /drivers | |
parent | b3324dc30321437ba7206db1e64a33f9de505779 (diff) |
gpu: nvgpu: kmalloc does not return error codes
kmalloc() returns NULL instead of error code on failure. Do not check
if the return value is an error code.
Change-Id: I31a46080ab51773a22bebe4cf03a5b0c94467204
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1172052
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 4a3d58cb..9790af05 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -6629,7 +6629,7 @@ int gr_gk20a_get_ctx_buffer_offsets(struct gk20a *g, | |||
6629 | return -ENODEV; | 6629 | return -ENODEV; |
6630 | 6630 | ||
6631 | priv_registers = kzalloc(sizeof(u32) * potential_offsets, GFP_KERNEL); | 6631 | priv_registers = kzalloc(sizeof(u32) * potential_offsets, GFP_KERNEL); |
6632 | if (IS_ERR_OR_NULL(priv_registers)) { | 6632 | if (!priv_registers) { |
6633 | gk20a_dbg_fn("failed alloc for potential_offsets=%d", potential_offsets); | 6633 | gk20a_dbg_fn("failed alloc for potential_offsets=%d", potential_offsets); |
6634 | err = PTR_ERR(priv_registers); | 6634 | err = PTR_ERR(priv_registers); |
6635 | goto cleanup; | 6635 | goto cleanup; |