From owner-svn-src-stable@freebsd.org Thu Oct 26 22:19:29 2017 Return-Path: Delivered-To: svn-src-stable@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 EDD3FE54390; Thu, 26 Oct 2017 22:19:29 +0000 (UTC) (envelope-from ian@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 BA7F56BBA3; Thu, 26 Oct 2017 22:19:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9QMJSjs092728; Thu, 26 Oct 2017 22:19:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9QMJSpt092727; Thu, 26 Oct 2017 22:19:28 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201710262219.v9QMJSpt092727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 26 Oct 2017 22:19:28 +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: r325023 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/dev/sdhci X-SVN-Commit-Revision: 325023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 22:19:30 -0000 Author: ian Date: Thu Oct 26 22:19:28 2017 New Revision: 325023 URL: https://svnweb.freebsd.org/changeset/base/325023 Log: MFC r314914: Release all previously allocated resources. Modified: stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Thu Oct 26 20:55:33 2017 (r325022) +++ stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c Thu Oct 26 22:19:28 2017 (r325023) @@ -220,9 +220,14 @@ sdhci_fdt_gpio_teardown(struct sdhci_fdt_gpio *gpio) if (gpio == NULL) return; - if (gpio->cd_ihandler != NULL) { + if (gpio->cd_ihandler != NULL) bus_teardown_intr(gpio->dev, gpio->cd_ires, gpio->cd_ihandler); - } + if (gpio->wp_pin != NULL) + gpio_pin_release(gpio->wp_pin); + if (gpio->cd_pin != NULL) + gpio_pin_release(gpio->cd_pin); + if (gpio->cd_ires != NULL) + bus_release_resource(gpio->dev, SYS_RES_IRQ, 0, gpio->cd_ires); free(gpio, M_DEVBUF); }