svn commit: r309755 - stable/11/sys/arm/allwinner
Emmanuel Vadot
manu at FreeBSD.org
Fri Dec 9 20:03:50 UTC 2016
Author: manu
Date: Fri Dec 9 20:03:49 2016
New Revision: 309755
URL: https://svnweb.freebsd.org/changeset/base/309755
Log:
MFC r309029:
Do not attempt to disable/release clock if it had not been enabled.
While here fix a style(9) issue.
Modified:
stable/11/sys/arm/allwinner/a10_ehci.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/arm/allwinner/a10_ehci.c
==============================================================================
--- stable/11/sys/arm/allwinner/a10_ehci.c Fri Dec 9 19:40:33 2016 (r309754)
+++ stable/11/sys/arm/allwinner/a10_ehci.c Fri Dec 9 20:03:49 2016 (r309755)
@@ -266,8 +266,10 @@ a10_ehci_attach(device_t self)
return (0);
error:
- if (aw_sc->clk)
+ if (aw_sc->clk != NULL) {
+ clk_disable(aw_sc->clk);
clk_release(aw_sc->clk);
+ }
a10_ehci_detach(self);
return (ENXIO);
}
@@ -328,8 +330,10 @@ a10_ehci_detach(device_t self)
A10_WRITE_4(sc, SW_USB_PMU_IRQ_ENABLE, reg_value);
/* Disable clock for USB */
- clk_disable(aw_sc->clk);
- clk_release(aw_sc->clk);
+ if (aw_sc->clk != NULL) {
+ clk_disable(aw_sc->clk);
+ clk_release(aw_sc->clk);
+ }
/* Assert reset */
if (aw_sc->rst != NULL) {
More information about the svn-src-stable-11
mailing list