summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Pemberton <wfp5p@virginia.edu>2010-05-05 19:27:29 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-11 18:36:12 (GMT)
commit1e19c054434c7d3ad618129c2ff5c3d81efa6949 (patch)
treede0af2766b61998dadff0807f6c6df821cbce70a
parent2342df0e63f4ca9a4227ea06f951f09180497914 (diff)
downloadlinux-fsl-qoriq-1e19c054434c7d3ad618129c2ff5c3d81efa6949.tar.xz
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>
-rw-r--r--drivers/staging/hv/Hv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index bfcb750..2418651 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -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;