aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2014-11-07 12:18:34 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-07 17:22:46 (GMT)
commitf9b64692e13b2f0d2a393e41972aa317f34a3e46 (patch)
tree2200326530e9e82f64eb54af3bde5d577e802c35 /drivers/staging/unisys
parentf36b9dfed7da05e327ca22b44468a29623922c4e (diff)
staging: unisys: unneeded NULL check
the NULL check for memregion is not required as it has already been checked for NULL after kzalloc. so we can reach this part of the code only if memregion is not NULL. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visorutil/memregion_direct.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c
index 26faad4..33522cc 100644
--- a/drivers/staging/unisys/visorutil/memregion_direct.c
+++ b/drivers/staging/unisys/visorutil/memregion_direct.c
@@ -57,10 +57,8 @@ visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes)
rc = memregion;
cleanup:
if (rc == NULL) {
- if (memregion != NULL) {
- visor_memregion_destroy(memregion);
- memregion = NULL;
- }
+ visor_memregion_destroy(memregion);
+ memregion = NULL;
}
return rc;
}

Privacy Policy