Commit ae8622ec authored by Peter Maydell's avatar Peter Maydell Committed by Kevin Wolf
Browse files

sheepdog: Remove unnecessary NULL check in sd_prealloc()



In commit 8b9ad56e, we removed the code that could result
in our getting to sd_prealloc()'s out_with_err_set label with a
NULL blk pointer. That makes the NULL check in the error-handling
path unnecessary, and Coverity gripes about it (CID 1390636).
Delete the redundant check.

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 4e24ed13
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1859,9 +1859,7 @@ out:
        error_setg_errno(errp, -ret, "Can't pre-allocate");
    }
out_with_err_set:
    if (blk) {
    blk_unref(blk);
    }
    g_free(buf);

    return ret;