From: Benjamin Romer Date: Mon, 16 Mar 2015 17:58:27 +0000 (-0400) Subject: staging: unisys: fix NULL comparison in destroy_controlvm_payload_info() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=597c338f0a6012e1360b7c71797b03438ff48fab;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git staging: unisys: fix NULL comparison in destroy_controlvm_payload_info() Just remove the NULL from the check and test the pointer directly. Signed-off-by: Benjamin Romer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 7956ae71e823..0f791fb0728f 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1299,7 +1299,7 @@ cleanup: static void destroy_controlvm_payload_info(struct controlvm_payload_info *info) { - if (info->ptr != NULL) { + if (info->ptr) { iounmap(info->ptr); info->ptr = NULL; }