Fix Wmaybe-uninitialized warning

Set the value to variable state before it is used.

Change-Id: I240b754483a1d36fadb6759e5c223472d7909cf3
Reviewed-on: https://gerrit.mot.com/1271405
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Andrew Wheeler <awheeler@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
a20023 2018-11-19 11:02:58 -06:00 • committed by Yi He
commit 153d10362d

View file

@ -894,7 +894,7 @@ static ssize_t force_chg_iusb_show(struct device *dev,
if (!mmi_chip) {
pr_err("chip not valid\n");
r = -ENODEV;
state = -ENODEV;
goto end;
}
@ -953,7 +953,7 @@ static ssize_t force_chg_idc_show(struct device *dev,
if (!mmi_chip) {
pr_err("chip not valid\n");
r = -ENODEV;
state = -ENODEV;
goto end;
}