storage: fix cert-c issue in tegra_hv driver

Using this patch we are fixing below cert error:-
1. check_return: Calling tegra_ivc_init without checking
   return value (as is done elsewhere 42 out of 52 times).

CID 10177835

Bug 3512545

Change-Id: I625914bbeee69718689d23da942feec9f05e9236
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2937650
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:
Manish Bhardwaj
2023-07-17 07:32:44 +00:00
committed by mobile promotions
parent 6f92155013
commit d421a6465c

View File

@@ -316,8 +316,12 @@ static int tegra_hv_add_ivc(struct tegra_hv_data *hvd,
INFO("adding ivc%u: rx_base=%lx tx_base = %lx size=%x irq = %d (%lu)\n", INFO("adding ivc%u: rx_base=%lx tx_base = %lx size=%x irq = %d (%lu)\n",
qd->id, rx_base, tx_base, qd->size, ivc->irq, d->hwirq); qd->id, rx_base, tx_base, qd->size, ivc->irq, d->hwirq);
tegra_ivc_init(&ivc->ivc, NULL, (void *)rx_base, 0, (void *)tx_base, 0, qd->nframes, qd->frame_size, ret = tegra_ivc_init(&ivc->ivc, NULL, (void *)rx_base, 0, (void *)tx_base, 0, qd->nframes,
ivc_raise_irq, ivc); qd->frame_size, ivc_raise_irq, ivc);
if (ret != 0) {
ERR("failed to init ivc queue #%u\n", qd->id);
return ret;
}
/* We may have rebooted, so the channel could be active. */ /* We may have rebooted, so the channel could be active. */
ret = tegra_ivc_channel_sync(&ivc->ivc); ret = tegra_ivc_channel_sync(&ivc->ivc);