summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAchal Verma <achalv@nvidia.com>2021-05-11 08:08:57 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2021-08-12 15:24:45 -0400
commit603a8031494660c40271862bd303a388d80378b0 (patch)
tree9bd87ac8930c9c4bcfe226f05042132c02029164
parentc89e76cc79bf5fcc9fd027e172028f3d08d3cfa0 (diff)
i2c-ivc: Check return value.
This fixes the coverity issue: 3008845 Bug 200741055 Change-Id: I57112e37a16aec516a21363038c1e6dc511a7f9c Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2527774 GVS: Gerrit_Virtual_Submit Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> (cherry picked from commit efb34ee4c7f2f48ac7910a6936f5e2c1fc8b42af) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2574544 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/i2c/busses/i2c-ivc-multi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-ivc-multi.c b/drivers/i2c/busses/i2c-ivc-multi.c
index 1722abfea..2ae795650 100644
--- a/drivers/i2c/busses/i2c-ivc-multi.c
+++ b/drivers/i2c/busses/i2c-ivc-multi.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2017-2020 NVIDIA Corporation. All rights reserved. 2 * Copyright (C) 2017-2021 NVIDIA Corporation. All rights reserved.
3 * 3 *
4 * This software is licensed under the terms of the GNU General Public 4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and 5 * License version 2, as published by the Free Software Foundation, and
@@ -229,7 +229,9 @@ static int tegra_i2c_ivc_multi_xfer(
229{ 229{
230 int ret = 0; 230 int ret = 0;
231 231
232 tegra_ivc_channel_runtime_get(sensor->i2c_ivc_dev->chan); 232 ret = tegra_ivc_channel_runtime_get(sensor->i2c_ivc_dev->chan);
233 if (ret < 0)
234 goto exit;
233 235
234 if (sensor->req_len == CAMRTC_I2C_MULTI_HEADER_SIZE) { 236 if (sensor->req_len == CAMRTC_I2C_MULTI_HEADER_SIZE) {
235 ret = 0; 237 ret = 0;