OSDN Git Service

efi_generate_file_device_path(): make all error paths use "goto err;"
authorPeter Jones <pjones@redhat.com>
Tue, 9 May 2017 20:32:09 +0000 (16:32 -0400)
committerPeter Jones <pjones@redhat.com>
Tue, 9 May 2017 20:35:27 +0000 (16:35 -0400)
Honestly I'm just trying to shut coverity up about checking
child_devpath for NULL-ness twice on the other two error paths.

Signed-off-by: Peter Jones <pjones@redhat.com>
src/creator.c

index ccd0faf..21fc6b0 100644 (file)
@@ -339,7 +339,7 @@ efi_generate_file_device_path(uint8_t *buf, ssize_t size,
        rc = find_file(filepath, &child_devpath, &relpath);
        if (rc < 0) {
                efi_error("could not canonicalize fs path");
-               return -1;
+               goto err;
        }
 
        rc = find_parent_devpath(child_devpath, &parent_devpath);