Skip to content
Browse files

drivers: adxl362: fix control flow issue

The return code check and error return on the interrupt register
configuration function call should be included in the #if defined

Fixes #16159

Signed-off-by: Brett Witherspoon <>
  • Loading branch information...
bwitherspoon authored and MaureenHelm committed May 15, 2019
1 parent 927012d commit 4cc486ec4f991cdf48847f0b67931e5fee7e87c5
Showing with 6 additions and 7 deletions.
  1. +6 −7 drivers/sensor/adxl362/adxl362.c
@@ -780,14 +780,13 @@ static int adxl362_init(struct device *dev)
return -EIO;

err = adxl362_interrupt_config(dev,

if (err) {
return err;
if (adxl362_interrupt_config(dev,
config->int2_config) < 0) {
LOG_ERR("Failed to configure interrupt");
return -EIO;

return 0;

0 comments on commit 4cc486e

Please sign in to comment.
You can’t perform that action at this time.