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:
parent
2342df0e63
commit
1e19c05443
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user