mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
platform: tegra: dce: fix coverity defect
- check the handle is valid before retrieving the client structure for the handle during client unregister. Bug 3952896 Change-Id: I6f37625e01453055fb4dc256cffb1f85f199aa36 Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2922622 Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com> Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: Arun Swain <arswain@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
e4f4ae06b6
commit
ebbb6ea7a2
@@ -203,7 +203,11 @@ int tegra_dce_unregister_ipc_client(u32 handle)
|
||||
{
|
||||
struct tegra_dce_client_ipc *cl;
|
||||
|
||||
cl = &client_handles[client_handle_to_index(handle)];
|
||||
cl = dce_client_ipc_lookup_handle(handle);
|
||||
if (cl == NULL) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dce_cond_destroy(&cl->recv_wait);
|
||||
|
||||
return dce_client_ipc_handle_free(handle);
|
||||
|
||||
Reference in New Issue
Block a user