Skip to content

Commit

Permalink
lp8727_charger: Make lp8727_init_device() shorter
Browse files Browse the repository at this point in the history
Just return with lp8727_write_byte(), no need to check its value.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
  • Loading branch information
Kim, Milo authored and Anton Vorontsov committed Sep 21, 2012
1 parent 65272ba commit 70be130
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/power/lp8727_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,7 @@ static int lp8727_init_device(struct lp8727_chg *pchg)
return ret;

val = LP8727_INT_EN | LP8727_CHGDET_EN;
ret = lp8727_write_byte(pchg, LP8727_CTRL2, val);
if (ret)
return ret;

return 0;
return lp8727_write_byte(pchg, LP8727_CTRL2, val);
}

static int lp8727_is_dedicated_charger(struct lp8727_chg *pchg)
Expand Down

0 comments on commit 70be130

Please sign in to comment.