From owner-svn-src-stable@freebsd.org Thu Jan 4 11:36:15 2018 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 66F7CEABDCA; Thu, 4 Jan 2018 11:36:15 +0000 (UTC) (envelope-from kib@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 31363649C6; Thu, 4 Jan 2018 11:36:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04BaECF033396; Thu, 4 Jan 2018 11:36:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04BaE9i033394; Thu, 4 Jan 2018 11:36:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041136.w04BaE9i033394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 4 Jan 2018 11:36:14 +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: r327542 - stable/11/usr.sbin/cpucontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/usr.sbin/cpucontrol X-SVN-Commit-Revision: 327542 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.25 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, 04 Jan 2018 11:36:15 -0000 Author: kib Date: Thu Jan 4 11:36:13 2018 New Revision: 327542 URL: https://svnweb.freebsd.org/changeset/base/327542 Log: MFC r327264i (by imp), r327283: Fix returns without cleanups. Modified: stable/11/usr.sbin/cpucontrol/intel.c stable/11/usr.sbin/cpucontrol/via.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/cpucontrol/intel.c ============================================================================== --- stable/11/usr.sbin/cpucontrol/intel.c Thu Jan 4 08:23:23 2018 (r327541) +++ stable/11/usr.sbin/cpucontrol/intel.c Thu Jan 4 11:36:13 2018 (r327542) @@ -145,7 +145,7 @@ intel_update(const char *dev, const char *path) fd = open(path, O_RDONLY, 0); if (fd < 0) { WARN(0, "open(%s)", path); - return; + goto fail; } error = fstat(fd, &st); if (error != 0) { @@ -259,7 +259,7 @@ matched: if (revision >= fw_header->revision) { WARNX(1, "skipping %s of rev %#x: up to date", path, fw_header->revision); - return; + goto fail; } fprintf(stderr, "%s: updating cpu %s from rev %#x to rev %#x... ", path, dev, revision, fw_header->revision); Modified: stable/11/usr.sbin/cpucontrol/via.c ============================================================================== --- stable/11/usr.sbin/cpucontrol/via.c Thu Jan 4 08:23:23 2018 (r327541) +++ stable/11/usr.sbin/cpucontrol/via.c Thu Jan 4 11:36:13 2018 (r327542) @@ -138,7 +138,7 @@ via_update(const char *dev, const char *path) fd = open(path, O_RDONLY, 0); if (fd < 0) { WARN(0, "open(%s)", path); - return; + goto fail; } error = fstat(fd, &st); if (error != 0) {