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:
parent
9291b2e0d7
commit
a996b228d2
@ -61,16 +61,10 @@ struct hello_context_t {
|
|||||||
static void
|
static void
|
||||||
hello_cleanup(struct hello_context_t *hello_context)
|
hello_cleanup(struct hello_context_t *hello_context)
|
||||||
{
|
{
|
||||||
if (hello_context->read_buff) {
|
|
||||||
spdk_dma_free(hello_context->read_buff);
|
spdk_dma_free(hello_context->read_buff);
|
||||||
}
|
|
||||||
if (hello_context->write_buff) {
|
|
||||||
spdk_dma_free(hello_context->write_buff);
|
spdk_dma_free(hello_context->write_buff);
|
||||||
}
|
|
||||||
if (hello_context) {
|
|
||||||
free(hello_context);
|
free(hello_context);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Callback routine for the blobstore unload.
|
* Callback routine for the blobstore unload.
|
||||||
|
Loading…
Reference in New Issue
Block a user