Received: from eggs.gnu.org ([2001:4830:134:3::10]:46095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fL5DB-0003NZ-TV for qemu-devel@nongnu.org; Tue, 22 May 2018 07:12:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fL5DA-0001bD-Uc for qemu-devel@nongnu.org; Tue, 22 May 2018 07:12:13 -0400 Date: Tue, 22 May 2018 13:12:05 +0200 From: Kevin Wolf Message-ID: <20180522111205.GD6233@localhost.localdomain> References: <20180518181717.6700-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180518181717.6700-1-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [PATCH] sheepdog: Remove unnecessary NULL check in sd_prealloc() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org, Hitoshi Mitake , Liu Yuan , Jeff Cody , Max Reitz , qemu-block@nongnu.org, sheepdog@lists.wpkg.org Am 18.05.2018 um 20:17 hat Peter Maydell geschrieben: > In commit 8b9ad56e9cbfd852a, 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 In fact, it was unnecessary even before that, because blk_unref(NULL) is valid (it does nothing). Thanks, applied to the block branch. Kevin