mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
drivers: adsp: fix check_return Coverity defect
Defect: check_return: Calling of_property_read_u32 without checking return value. Fix the defect by validating the return value. CID 10129674 Bug 3461002 Change-Id: Idd236fccabc23b789d57c29c126e09391df022dc Signed-off-by: Prateek Patel <prpatel@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2650556 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
0b2760e995
commit
5efd53d8fb
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* A device driver for ADSP and APE
|
||||
*
|
||||
* Copyright (C) 2014-2021, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (C) 2014-2022, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
@@ -293,11 +293,13 @@ static int __init nvadsp_parse_dt(struct platform_device *pdev)
|
||||
drv_data->adsp_os_secload = of_property_read_bool(dev->of_node,
|
||||
"nvidia,adsp_os_secload");
|
||||
|
||||
of_property_read_u32(dev->of_node, "nvidia,tegra_platform",
|
||||
&drv_data->tegra_platform);
|
||||
if (of_property_read_u32(dev->of_node, "nvidia,tegra_platform",
|
||||
&drv_data->tegra_platform))
|
||||
dev_dbg(dev, "tegra_platform dt not found\n");
|
||||
|
||||
of_property_read_u32(dev->of_node, "nvidia,adsp_load_timeout",
|
||||
&drv_data->adsp_load_timeout);
|
||||
if (of_property_read_u32(dev->of_node, "nvidia,adsp_load_timeout",
|
||||
&drv_data->adsp_load_timeout))
|
||||
dev_dbg(dev, "adsp_load_timeout dt not found\n");
|
||||
|
||||
if (drv_data->adsp_unit_fpga) {
|
||||
for (iter = 0; iter < ADSP_UNIT_FPGA_RESET_END; iter++) {
|
||||
|
||||
Reference in New Issue
Block a user