diff options
author | Chanwoo Choi <cwchoi00@gmail.com> | 2015-09-29 12:06:31 +0200 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2015-09-30 12:11:47 +0200 |
commit | e9844b2cafd7b78486400f9b6cf3188e9a527312 (patch) | |
tree | 05017aee6f2657940ffe92353f714e0ace95949b /drivers/extcon/extcon-arizona.c | |
parent | extcon: arizona: Add support for WM8998 and WM1814 (diff) | |
download | linux-e9844b2cafd7b78486400f9b6cf3188e9a527312.tar.xz linux-e9844b2cafd7b78486400f9b6cf3188e9a527312.zip |
extcon: arizona: Reorder the default statement to remove unnecessary warning
This patch reorders the default statement to remove unnecessary warning message
when info->hpdet_ip_version is higher than 2.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/extcon/extcon-arizona.c')
-rw-r--r-- | drivers/extcon/extcon-arizona.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index b01030735f0c..a1ab0a56b798 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -477,9 +477,6 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) arizona_hpdet_b_ranges[range].factor_a); break; - default: - dev_warn(arizona->dev, "Unknown HPDET IP revision %d\n", - info->hpdet_ip_version); case 2: if (!(val & ARIZONA_HP_DONE_B)) { dev_err(arizona->dev, "HPDET did not complete: %x\n", @@ -516,6 +513,12 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info) arizona_hpdet_c_ranges[range].min); val = arizona_hpdet_c_ranges[range].min; } + break; + + default: + dev_warn(arizona->dev, "Unknown HPDET IP revision %d\n", + info->hpdet_ip_version); + return -EINVAL; } dev_dbg(arizona->dev, "HP impedance %d ohms\n", val); |