mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
nvgpu_engine_is_valid_runlist_id already iterates the list of active engines, therefore the engine_id is already known to be valid. Remove call to nvgpu_engine_get_active_eng_info (which iterates all engines), and fetch f->engine_info[engine_id] instead. Also remove non-NULL test for engine_info, which could not be true. Also make sure to reset num_engines in nvgpu_cleanup_sw, to avoid accessing uninitialized active_engines_list in unit test corner cases (targetting init/remove support). Jira NVGPU-4511 Change-Id: Ia6b904a7f3ca46e5097f06770b4caad317ec967b Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2263618 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
25 KiB
25 KiB