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: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/374205
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2017-08-14 15:14:19 -07:00
parent 9291b2e0d7
commit a996b228d2

View File

@ -61,15 +61,9 @@ 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);
}
}
/*