Staging: xgifb: Fix NULL pointer comparison warning
authorManinder Singh <maninder.s2@samsung.com>
Thu, 20 Oct 2016 12:47:03 +0000 (18:17 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Oct 2016 08:56:16 +0000 (10:56 +0200)
Replace direct comparisons to NULL i.e.
'x == NULL' with '!x'.
This problem was detected by checkpatch.

Signed-off-by: Maninder Singh <maninder.s2@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/XGI_main_26.c

index 0c78491ff5a1c6f0a42d0d55e51390fb4410bbd2..89bd4dd6e8a595b30108d8cd6266e70ca90d6667 100644 (file)
@@ -518,7 +518,7 @@ static void XGIfb_search_crt2type(const char *name)
 {
        int i = 0;
 
-       if (name == NULL)
+       if (!name)
                return;
 
        while (XGI_crt2type[i].type_no != -1) {
@@ -589,7 +589,7 @@ static void XGIfb_search_tvstd(const char *name)
 {
        int i = 0;
 
-       if (name == NULL)
+       if (!name)
                return;
 
        while (XGI_tvtype[i].type_no != -1) {