mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Add NULL checks for therm HALs
Add NULL checks for therm HALs JIRA NVGPU-9495 Change-Id: If4fd1166c11070a978546e701157d2a217008e39 Signed-off-by: Divya <dsinghatwari@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2844938 Reviewed-by: Seema Khowala <seemaj@nvidia.com> Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Tested-by: Rajesh Devaraj <rdevaraj@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -33,6 +33,11 @@ static void nvgpu_cg_set_mode(struct gk20a *g, u32 cgmode, u32 mode_config)
|
||||
const struct nvgpu_device *dev = NULL;
|
||||
struct nvgpu_fifo *f = &g->fifo;
|
||||
|
||||
if ((g->ops.therm.init_blcg_mode == NULL) &&
|
||||
(g->ops.therm.init_elcg_mode == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
for (n = 0; n < f->num_engines; n++) {
|
||||
|
||||
Reference in New Issue
Block a user