From owner-svn-src-stable-11@freebsd.org Sat Oct 15 08:52:43 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C70E0C12CFE; Sat, 15 Oct 2016 08:52:43 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C278BF3; Sat, 15 Oct 2016 08:52:43 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9F8qgTk048214; Sat, 15 Oct 2016 08:52:42 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9F8qgeR048213; Sat, 15 Oct 2016 08:52:42 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610150852.u9F8qgeR048213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 15 Oct 2016 08:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r307346 - stable/11/sys/dev/ofw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2016 08:52:43 -0000 Author: mmel Date: Sat Oct 15 08:52:42 2016 New Revision: 307346 URL: https://svnweb.freebsd.org/changeset/base/307346 Log: MFC r302560: OFWPCI: Fix style(9). No functional change. Modified: stable/11/sys/dev/ofw/ofwpci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofwpci.c ============================================================================== --- stable/11/sys/dev/ofw/ofwpci.c Sat Oct 15 08:31:46 2016 (r307345) +++ stable/11/sys/dev/ofw/ofwpci.c Sat Oct 15 08:52:42 2016 (r307346) @@ -195,7 +195,7 @@ ofw_pci_init(device_t dev) sc->sc_io_rman.rm_type = RMAN_ARRAY; sc->sc_io_rman.rm_descr = "PCI I/O Ports"; error = rman_init(&sc->sc_io_rman); - if (error) { + if (error != 0) { device_printf(dev, "rman_init() failed. error = %d\n", error); goto out; } @@ -203,7 +203,7 @@ ofw_pci_init(device_t dev) sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "PCI Memory"; error = rman_init(&sc->sc_mem_rman); - if (error) { + if (error != 0) { device_printf(dev, "rman_init() failed. error = %d\n", error); goto out; } @@ -226,7 +226,7 @@ ofw_pci_init(device_t dev) break; } - if (error) { + if (error != 0) { device_printf(dev, "rman_manage_region(%x, %#jx, %#jx) failed. " "error = %d\n", rp->pci_hi & @@ -257,7 +257,7 @@ ofw_pci_attach(device_t dev) sc = device_get_softc(dev); if (!sc->sc_initialized) { error = ofw_pci_init(dev); - if (error) + if (error != 0) return (error); } @@ -437,9 +437,11 @@ ofw_pci_release_resource(device_t bus, d { if (rman_get_flags(res) & RF_ACTIVE) { - int error = bus_deactivate_resource(child, type, rid, res); - if (error) - return error; + int error; + + error = bus_deactivate_resource(child, type, rid, res); + if (error != 0) + return (error); } return (rman_release_resource(res)); @@ -544,9 +546,10 @@ static int ofw_pci_adjust_resource(device_t bus, device_t child, int type, struct resource *res, rman_res_t start, rman_res_t end) { - struct rman *rm = NULL; - struct ofw_pci_softc *sc = device_get_softc(bus); + struct rman *rm; + struct ofw_pci_softc *sc; + sc = device_get_softc(bus); KASSERT(!(rman_get_flags(res) & RF_ACTIVE), ("active resources cannot be adjusted")); if (rman_get_flags(res) & RF_ACTIVE)