mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: add checks for kzalloc() allocations
Check kzalloc() allocations for failures and return
an error if an allocation fails.
Bug 2279948
Change-Id: I8a2c3b84904da897ad6118900c11489c8656c20f
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2020123
(cherry picked from commit fadd0014da)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298066
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ea14973b14
commit
aaecfae53f
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* gk20a clock scaling profile
|
||||
*
|
||||
* Copyright (c) 2013-2018, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2013-2020, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -339,6 +339,8 @@ void gk20a_scale_init(struct device *dev)
|
||||
return;
|
||||
|
||||
profile = nvgpu_kzalloc(g, sizeof(*profile));
|
||||
if (!profile)
|
||||
return;
|
||||
|
||||
profile->dev = dev;
|
||||
profile->dev_stat.busy = false;
|
||||
|
||||
Reference in New Issue
Block a user