You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2021/03/01 06:47:29 UTC
[mynewt-core] 07/19: sensors/bma2xx: Fix unused value, issue 204179
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 9b380be52065d4327bc5a44e31133c7a49ebb45b
Author: Magdalena Kasenberg <ma...@codecoup.pl>
AuthorDate: Wed Feb 24 12:18:53 2021 +0100
sensors/bma2xx: Fix unused value, issue 204179
Coverity issue 204179
---
hw/drivers/sensors/bma2xx/src/bma2xx.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/drivers/sensors/bma2xx/src/bma2xx.c b/hw/drivers/sensors/bma2xx/src/bma2xx.c
index 0f8a4ac..78a9bd0 100644
--- a/hw/drivers/sensors/bma2xx/src/bma2xx.c
+++ b/hw/drivers/sensors/bma2xx/src/bma2xx.c
@@ -4227,6 +4227,7 @@ bma2xx_wait_for_tap(struct bma2xx *bma2xx,
{
#if MYNEWT_VAL(BMA2XX_INT_ENABLE)
int rc = 0;
+ int rc2 = 0;
enum bma2xx_power_mode request_power[3];
struct int_enable int_enable_org;
struct int_enable int_enable = { 0 };
@@ -4313,7 +4314,10 @@ done:
pdd->interrupt = NULL;
disable_intpin(bma2xx);
/* Restore previous routing */
- rc = bma2xx_set_int_routes(bma2xx, &int_routes_org);
+ rc2 = bma2xx_set_int_routes(bma2xx, &int_routes_org);
+ if (rc == 0) {
+ rc = rc2;
+ }
return rc;
#else