mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvidia-oot: fix Coverity defects
Using this patch we are fixing coverity defects in CAN and storage OOPS driver. CID 10132028: Unchecked return value (CHECKED_RETURN) CID 10166522: Uninitialized scalar variable (UNINIT) CID 10166537: Uninitialized scalar variable (UNINIT) CID 10166580: Uninitialized scalar variable (UNINIT) Bug 3952896 Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> Change-Id: I3caf0a9121a4480567ce32c6777b547901f24815 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860630 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
35c308a22c
commit
aa5d06bcd3
@@ -118,7 +118,7 @@ static int32_t wait_for_fops_completion(struct vblk_dev *vblkdev_oops, bool is_r
|
|||||||
static ssize_t vblk_oops_read(char *buf, size_t bytes, loff_t pos)
|
static ssize_t vblk_oops_read(char *buf, size_t bytes, loff_t pos)
|
||||||
{
|
{
|
||||||
struct vsc_request *vsc_req;
|
struct vsc_request *vsc_req;
|
||||||
struct vs_request req_in;
|
struct vs_request req_in = {0};
|
||||||
struct vs_request req_out;
|
struct vs_request req_out;
|
||||||
uint32_t blocks, block_pos;
|
uint32_t blocks, block_pos;
|
||||||
uint32_t block_size = vblkdev_oops->config.blk_config.hardblk_size;
|
uint32_t block_size = vblkdev_oops->config.blk_config.hardblk_size;
|
||||||
@@ -203,7 +203,7 @@ static ssize_t vblk_oops_write(const char *buf, size_t bytes,
|
|||||||
loff_t pos)
|
loff_t pos)
|
||||||
{
|
{
|
||||||
struct vsc_request *vsc_req;
|
struct vsc_request *vsc_req;
|
||||||
struct vs_request req_in;
|
struct vs_request req_in = {0};
|
||||||
struct vs_request req_out;
|
struct vs_request req_out;
|
||||||
uint32_t blocks, block_pos;
|
uint32_t blocks, block_pos;
|
||||||
uint32_t block_size = vblkdev_oops->config.blk_config.hardblk_size;
|
uint32_t block_size = vblkdev_oops->config.blk_config.hardblk_size;
|
||||||
@@ -308,7 +308,7 @@ static ssize_t vblk_oops_panic_write(const char *buf, size_t bytes,
|
|||||||
loff_t pos)
|
loff_t pos)
|
||||||
{
|
{
|
||||||
struct vsc_request *vsc_req;
|
struct vsc_request *vsc_req;
|
||||||
struct vs_request req_in;
|
struct vs_request req_in = {0};
|
||||||
uint32_t blocks, block_pos;
|
uint32_t blocks, block_pos;
|
||||||
uint32_t block_size = vblkdev_oops->config.blk_config.hardblk_size;
|
uint32_t block_size = vblkdev_oops->config.blk_config.hardblk_size;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../include/m_ttcan.h"
|
#include "../include/m_ttcan.h"
|
||||||
@@ -1787,7 +1787,11 @@ static int mttcan_probe(struct platform_device *pdev)
|
|||||||
priv->gpio_can_stb.active_low = flags & OF_GPIO_ACTIVE_LOW;
|
priv->gpio_can_stb.active_low = flags & OF_GPIO_ACTIVE_LOW;
|
||||||
priv->instance = of_alias_get_id(np, "mttcan");
|
priv->instance = of_alias_get_id(np, "mttcan");
|
||||||
priv->poll = of_property_read_bool(np, "use-polling");
|
priv->poll = of_property_read_bool(np, "use-polling");
|
||||||
of_property_read_u32_array(np, "tt-param", priv->tt_param, 2);
|
|
||||||
|
if (of_property_read_u32_array(np, "tt-param", priv->tt_param, 2) != 0) {
|
||||||
|
pr_info("TT CAN feature is not supported\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (of_property_read_u32_array(np, "tx-config",
|
if (of_property_read_u32_array(np, "tx-config",
|
||||||
priv->tx_conf, TX_CONF_MAX)) {
|
priv->tx_conf, TX_CONF_MAX)) {
|
||||||
dev_err(priv->device, "tx-config missing\n");
|
dev_err(priv->device, "tx-config missing\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user