mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Fix NULL check for boardobj allocation
When we allocate boardobj object, we assign the allocated address to *ppboardobj. The check for result of allocation checks looks at address in ppboardobj. Fix the check so that it actually checks results of kzalloc(). Change-Id: I90fda36afd1627efcf2fdea46bcd7ad1a7e3bb51 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1275738 GVS: Gerrit_Virtual_Submit Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
48a643c5e0
commit
61cb249f09
@@ -33,7 +33,7 @@ u32 boardobj_construct_super(struct gk20a *g, struct boardobj **ppboardobj,
|
||||
|
||||
if (*ppboardobj == NULL) {
|
||||
*ppboardobj = kzalloc(size, GFP_KERNEL);
|
||||
if (ppboardobj == NULL)
|
||||
if (*ppboardobj == NULL)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user