]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: fsl-mc: be consistent when checking strcmp() return
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Tue, 27 Jun 2017 14:41:22 +0000 (17:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Jun 2017 14:38:52 +0000 (16:38 +0200)
Stick to one way of checking the return code of strcmp(): use '!'.
This was suggested in a review comment.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c

index 9291847b1d14ff0758de242eb1fc89f4a03bbf42..d34e2ff80e37a7f88dfe2754f19e6b5405761edd 100644 (file)
@@ -19,9 +19,9 @@
 
 static bool __must_check fsl_mc_is_allocatable(const char *obj_type)
 {
-       return strcmp(obj_type, "dpbp") == 0 ||
-              strcmp(obj_type, "dpmcp") == 0 ||
-              strcmp(obj_type, "dpcon") == 0;
+       return strcmp(obj_type, "dpbp") ||
+              strcmp(obj_type, "dpmcp") ||
+              strcmp(obj_type, "dpcon");
 }
 
 /**