Archived
14
0
Fork 0

Staging: hv: Remove check for NULL before calling kfree()

kfree() knows how to deal with NULL, so there's no reason to check for
NULL before passing something to it.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Bill Pemberton 2010-05-05 15:27:29 -04:00 committed by Greg Kroah-Hartman
parent 2342df0e63
commit 1e19c05443

View file

@ -305,11 +305,9 @@ void HvCleanup(void)
DPRINT_ENTER(VMBUS);
if (gHvContext.SignalEventBuffer) {
gHvContext.SignalEventBuffer = NULL;
gHvContext.SignalEventParam = NULL;
kfree(gHvContext.SignalEventBuffer);
}
kfree(gHvContext.SignalEventBuffer);
gHvContext.SignalEventBuffer = NULL;
gHvContext.SignalEventParam = NULL;
if (gHvContext.HypercallPage) {
hypercallMsr.AsUINT64 = 0;