Loading drivers/iio/adc/qcom-rradc.c +7 −5 Original line number Diff line number Diff line Loading @@ -793,7 +793,7 @@ static int rradc_check_status_ready_with_retry(struct rradc_chip *chip, static int rradc_read_channel_with_continuous_mode(struct rradc_chip *chip, struct rradc_chan_prop *prop, u8 *buf) { int rc = 0; int rc = 0, ret = 0; u16 status = 0; rc = rradc_enable_continuous_mode(chip); Loading @@ -806,23 +806,25 @@ static int rradc_read_channel_with_continuous_mode(struct rradc_chip *chip, rc = rradc_read(chip, status, buf, 1); if (rc < 0) { pr_err("status read failed:%d\n", rc); return rc; ret = rc; goto disable; } rc = rradc_check_status_ready_with_retry(chip, prop, buf, status); if (rc < 0) { pr_err("Status read failed:%d\n", rc); return rc; ret = rc; } disable: rc = rradc_disable_continuous_mode(chip); if (rc < 0) { pr_err("Failed to switch to non continuous mode\n"); return rc; ret = rc; } return rc; return ret; } static int rradc_enable_batt_id_channel(struct rradc_chip *chip, bool enable) Loading Loading
drivers/iio/adc/qcom-rradc.c +7 −5 Original line number Diff line number Diff line Loading @@ -793,7 +793,7 @@ static int rradc_check_status_ready_with_retry(struct rradc_chip *chip, static int rradc_read_channel_with_continuous_mode(struct rradc_chip *chip, struct rradc_chan_prop *prop, u8 *buf) { int rc = 0; int rc = 0, ret = 0; u16 status = 0; rc = rradc_enable_continuous_mode(chip); Loading @@ -806,23 +806,25 @@ static int rradc_read_channel_with_continuous_mode(struct rradc_chip *chip, rc = rradc_read(chip, status, buf, 1); if (rc < 0) { pr_err("status read failed:%d\n", rc); return rc; ret = rc; goto disable; } rc = rradc_check_status_ready_with_retry(chip, prop, buf, status); if (rc < 0) { pr_err("Status read failed:%d\n", rc); return rc; ret = rc; } disable: rc = rradc_disable_continuous_mode(chip); if (rc < 0) { pr_err("Failed to switch to non continuous mode\n"); return rc; ret = rc; } return rc; return ret; } static int rradc_enable_batt_id_channel(struct rradc_chip *chip, bool enable) Loading