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>
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;