Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e19c054 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman
Browse files

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: default avatarBill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2342df0e
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -305,11 +305,9 @@ void HvCleanup(void)

	DPRINT_ENTER(VMBUS);

	if (gHvContext.SignalEventBuffer) {
	kfree(gHvContext.SignalEventBuffer);
	gHvContext.SignalEventBuffer = NULL;
	gHvContext.SignalEventParam = NULL;
		kfree(gHvContext.SignalEventBuffer);
	}

	if (gHvContext.HypercallPage) {
		hypercallMsr.AsUINT64 = 0;