mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
drivers: platform: dce: fix Coverity defects
Dereference after null check for pointers cl and handlep. Add a null check before referencing cl and handlep. Check return value of request_firmware for error. Using uninitialized value event when calling dce_worker_thread_wait. Add EVENT_ID_DCE_INVALID_EVENT and have a check before using the value event. CID 10127898 CID 10127999 CID 10127954 CID 10127811 Bug 3461002 Change-Id: If00ece28fd52e495b3a8d3eec7bdb4825d3c7892 Signed-off-by: Prateek Patel <prpatel@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2661588 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Laxman Dewangan
parent
b2d304096e
commit
9b5416fd50
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -159,7 +159,10 @@ struct dce_firmware *dce_request_firmware(struct tegra_dce *d,
|
||||
if (!fw)
|
||||
return NULL;
|
||||
|
||||
request_firmware(&l_fw, fw_name, dev);
|
||||
if (request_firmware(&l_fw, fw_name, dev) < 0) {
|
||||
dce_err(d, "FW Request Failed");
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!l_fw)
|
||||
goto err;
|
||||
|
||||
Reference in New Issue
Block a user