staging: unisys: fix NULL comparison in destroy_controlvm_payload_info()
authorBenjamin Romer <benjamin.romer@unisys.com>
Mon, 16 Mar 2015 17:58:27 +0000 (13:58 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Mar 2015 20:53:53 +0000 (21:53 +0100)
Just remove the NULL from the check and test the pointer directly.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorchipset/visorchipset_main.c

index 7956ae7..0f791fb 100644 (file)
@@ -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;
        }