Date: Fri, 9 Dec 2016 20:03:49 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r309755 - stable/11/sys/arm/allwinner Message-ID: <201612092003.uB9K3n8w040359@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612092003.uB9K3n8w040359>