Skip to content

Commit

Permalink
usb: chipidea: host: set host to be null after hcd is freed
Browse files Browse the repository at this point in the history
Set ci->hcd and ci->otg.host to be null in host_stop since the
hcd already freed.

Signed-off-by: Li Jun <jun.li@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
  • Loading branch information
Li Jun authored and Peter Chen committed Dec 24, 2015
1 parent 4b19b78 commit 43a4045
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/chipidea/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ static void host_stop(struct ci_hdrc *ci)
(ci->platdata->flags & CI_HDRC_TURN_VBUS_EARLY_ON))
regulator_disable(ci->platdata->reg_vbus);
}
ci->hcd = NULL;
ci->otg.host = NULL;
}


Expand Down

0 comments on commit 43a4045

Please sign in to comment.