Use proper failure path rather than just returning.
CID: 1199354, 1006894, 1006893, 1006892
This commit is contained in:
parent
1987e300d0
commit
d79dc9b482
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user