Use proper failure path rather than just returning.

CID: 1199354, 1006894, 1006893, 1006892
This commit is contained in:
Warner Losh 2017-12-28 05:33:24 +00:00
parent 1987e300d0
commit d79dc9b482
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327264
2 changed files with 2 additions and 2 deletions

View File

@ -261,7 +261,7 @@ intel_update(const char *dev, const char *path)
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);

View File

@ -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) {