mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: Check for NULL in job allocation
When allocating job channel_gk20a_job structure we assign the result of allocation to *job_out, but we check the result of allocation in job_out. Change the check to check for result in *job_out. Change-Id: Ia170cfa2dd5730665434b4c223c5a2f9502c744d Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1275741 GVS: Gerrit_Virtual_Submit Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
2958db6f56
commit
b6031e4e15
@@ -1573,7 +1573,7 @@ static int channel_gk20a_alloc_job(struct channel_gk20a *c,
|
||||
} else {
|
||||
*job_out = kzalloc(sizeof(struct channel_gk20a_job),
|
||||
GFP_KERNEL);
|
||||
if (!job_out)
|
||||
if (!*job_out)
|
||||
err = -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user