diff options
author | Anda-Maria Nicolae <anda-maria.nicolae@intel.com> | 2015-03-05 12:23:56 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-03-07 19:36:29 +0100 |
commit | 42d0631bb6c9bd730437cca19e5b870ecd24215d (patch) | |
tree | 11638727cda66151de65eb2e470a864f4362077c /drivers/power/bq2415x_charger.c | |
parent | power/smb347-charger.c: set IRQF_ONESHOT flag to ensure IRQ request (diff) | |
download | linux-42d0631bb6c9bd730437cca19e5b870ecd24215d.tar.xz linux-42d0631bb6c9bd730437cca19e5b870ecd24215d.zip |
bq2415x_charger: Remove unnecessary else after return
Fix coding style to comply with checkpatch.pl
Signed-off-by: Anda-Maria Nicolae <anda-maria.nicolae@intel.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/bq2415x_charger.c')
-rw-r--r-- | drivers/power/bq2415x_charger.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c index 727740066754..4976c1b4bc82 100644 --- a/drivers/power/bq2415x_charger.c +++ b/drivers/power/bq2415x_charger.c @@ -346,8 +346,7 @@ static int bq2415x_exec_command(struct bq2415x_device *bq, BQ2415X_BIT_CE); if (ret < 0) return ret; - else - return ret > 0 ? 0 : 1; + return ret > 0 ? 0 : 1; case BQ2415X_CHARGER_ENABLE: return bq2415x_i2c_write_bit(bq, BQ2415X_REG_CONTROL, 0, BQ2415X_BIT_CE); @@ -420,20 +419,17 @@ static enum bq2415x_chip bq2415x_detect_chip(struct bq2415x_device *bq) case 0: if (bq->chip == BQ24151A) return bq->chip; - else - return BQ24151; + return BQ24151; case 1: if (bq->chip == BQ24150A || bq->chip == BQ24152 || bq->chip == BQ24155) return bq->chip; - else - return BQ24150; + return BQ24150; case 2: if (bq->chip == BQ24153A) return bq->chip; - else - return BQ24153; + return BQ24153; default: return BQUNKNOWN; } @@ -444,8 +440,7 @@ static enum bq2415x_chip bq2415x_detect_chip(struct bq2415x_device *bq) case 0: if (bq->chip == BQ24156A) return bq->chip; - else - return BQ24156; + return BQ24156; case 2: return BQ24158; default: @@ -474,8 +469,7 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq) case BQ24152: if (ret >= 0 && ret <= 3) return ret; - else - return -1; + return -1; case BQ24153: case BQ24153A: case BQ24156: @@ -485,13 +479,11 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq) return 0; else if (ret == 1) return 1; - else - return -1; + return -1; case BQ24155: if (ret == 3) return 3; - else - return -1; + return -1; case BQUNKNOWN: return -1; } |