svn commit: r327264 - head/usr.sbin/cpucontrol
Warner Losh
imp at FreeBSD.org
Thu Dec 28 05:33:26 UTC 2017
Author: imp
Date: Thu Dec 28 05:33:24 2017
New Revision: 327264
URL: https://svnweb.freebsd.org/changeset/base/327264
Log:
Use proper failure path rather than just returning.
CID: 1199354, 1006894, 1006893, 1006892
Modified:
head/usr.sbin/cpucontrol/intel.c
head/usr.sbin/cpucontrol/via.c
Modified: head/usr.sbin/cpucontrol/intel.c
==============================================================================
--- head/usr.sbin/cpucontrol/intel.c Thu Dec 28 05:33:19 2017 (r327263)
+++ head/usr.sbin/cpucontrol/intel.c Thu Dec 28 05:33:24 2017 (r327264)
@@ -261,7 +261,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: head/usr.sbin/cpucontrol/via.c
==============================================================================
--- head/usr.sbin/cpucontrol/via.c Thu Dec 28 05:33:19 2017 (r327263)
+++ head/usr.sbin/cpucontrol/via.c Thu Dec 28 05:33:24 2017 (r327264)
@@ -140,7 +140,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) {
More information about the svn-src-all
mailing list