sheepdog: Remove unnecessary NULL check in sd_prealloc()

In commit 8b9ad56e9c, 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: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Peter Maydell 2018-05-18 19:17:17 +01:00 committed by Kevin Wolf
parent 4e24ed138b
commit ae8622ec19

View File

@ -1859,9 +1859,7 @@ out:
error_setg_errno(errp, -ret, "Can't pre-allocate");
}
out_with_err_set:
if (blk) {
blk_unref(blk);
}
blk_unref(blk);
g_free(buf);
return ret;