staging: fsl-mc: be consistent when checking strcmp() returns
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Wed, 23 Aug 2017 10:36:16 +0000 (13:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2017 23:22:32 +0000 (16:22 -0700)
Throughout the driver we use == 0 / != 0 to check strcmp() returns except
this place, so fix it.

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

index 485abad0f32f3e9df91ed51461c96364da20a727..06df528f4cfc20815c76f459b94e1208ff546c9c 100644 (file)
@@ -29,7 +29,7 @@ static bool fsl_mc_device_match(struct fsl_mc_device *mc_dev,
                                struct fsl_mc_obj_desc *obj_desc)
 {
        return mc_dev->obj_desc.id == obj_desc->id &&
-              !strcmp(mc_dev->obj_desc.type, obj_desc->type);
+              strcmp(mc_dev->obj_desc.type, obj_desc->type) == 0;
 
 }