Commit a996b228 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

blob_hello: remove unnecessary cleanup NULL checks



hello_context is never NULL when hello_cleanup() is called, and
spdk_dma_free() does nothing if the parameter is NULL.

Change-Id: I7004d70a17e5dc237206b95c26df9b100952df65
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/374205


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 9291b2e0
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -61,16 +61,10 @@ struct hello_context_t {
static void
hello_cleanup(struct hello_context_t *hello_context)
{
	if (hello_context->read_buff) {
	spdk_dma_free(hello_context->read_buff);
	}
	if (hello_context->write_buff) {
	spdk_dma_free(hello_context->write_buff);
	}
	if (hello_context) {
	free(hello_context);
}
}

/*
 * Callback routine for the blobstore unload.