mfd: tps65910: Move an assignment in tps65910_sleepinit()

Move the assignment for the local variable "dev" so that its setting
will be performed after a configuration check by this function.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Markus Elfring 2018-03-09 09:19:42 +01:00 committed by Lee Jones
parent da257efa87
commit 71bc4f1de3
1 changed files with 2 additions and 2 deletions

View File

@ -315,11 +315,11 @@ static int tps65910_sleepinit(struct tps65910 *tps65910,
struct device *dev;
int ret;
dev = tps65910->dev;
if (!pmic_pdata->en_dev_slp)
return 0;
dev = tps65910->dev;
/* enabling SLEEP device state */
ret = tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL,
DEVCTRL_DEV_SLP_MASK);