1
0
Fork 0

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>
hifive-unleashed-5.1
Sudip Mukherjee 2014-11-07 17:48:34 +05:30 committed by Greg Kroah-Hartman
parent f36b9dfed7
commit f9b64692e1
1 changed files with 2 additions and 4 deletions

View File

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