diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-04-07 20:12:32 -0400 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2013-04-08 18:53:46 -0400 |
commit | c2536543d53be247786b8beb7c505c629fd55813 (patch) | |
tree | 59eff36c22e2927df4476245ed366af0d05c70ed /drivers/extcon | |
parent | 6ed28105c07e0e03bf5f5a99380b726fc4de6e93 (diff) |
extcon: max77693: Fix return value
Return the value obtained from the function instead of hardcoding.
Silences the following warnings:
drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-max77693.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 7b2e93d4f60c..b56bdaa27d4b 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c | |||
@@ -258,7 +258,7 @@ static int max77693_muic_set_debounce_time(struct max77693_muic_info *info, | |||
258 | CONTROL3_ADCDBSET_MASK); | 258 | CONTROL3_ADCDBSET_MASK); |
259 | if (ret) { | 259 | if (ret) { |
260 | dev_err(info->dev, "failed to set ADC debounce time\n"); | 260 | dev_err(info->dev, "failed to set ADC debounce time\n"); |
261 | return -EAGAIN; | 261 | return ret; |
262 | } | 262 | } |
263 | break; | 263 | break; |
264 | default: | 264 | default: |
@@ -294,7 +294,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info, | |||
294 | MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK); | 294 | MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK); |
295 | if (ret < 0) { | 295 | if (ret < 0) { |
296 | dev_err(info->dev, "failed to update MUIC register\n"); | 296 | dev_err(info->dev, "failed to update MUIC register\n"); |
297 | return -EAGAIN; | 297 | return ret; |
298 | } | 298 | } |
299 | 299 | ||
300 | if (attached) | 300 | if (attached) |
@@ -307,7 +307,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info, | |||
307 | CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); | 307 | CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); |
308 | if (ret < 0) { | 308 | if (ret < 0) { |
309 | dev_err(info->dev, "failed to update MUIC register\n"); | 309 | dev_err(info->dev, "failed to update MUIC register\n"); |
310 | return -EAGAIN; | 310 | return ret; |
311 | } | 311 | } |
312 | 312 | ||
313 | dev_info(info->dev, | 313 | dev_info(info->dev, |
@@ -1035,7 +1035,7 @@ static int max77693_muic_detect_accessory(struct max77693_muic_info *info) | |||
1035 | if (ret) { | 1035 | if (ret) { |
1036 | dev_err(info->dev, "failed to read MUIC register\n"); | 1036 | dev_err(info->dev, "failed to read MUIC register\n"); |
1037 | mutex_unlock(&info->mutex); | 1037 | mutex_unlock(&info->mutex); |
1038 | return -EINVAL; | 1038 | return ret; |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | adc = max77693_muic_get_cable_type(info, MAX77693_CABLE_GROUP_ADC, | 1041 | adc = max77693_muic_get_cable_type(info, MAX77693_CABLE_GROUP_ADC, |