]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: unisys: visorbus: use guid_is_equal instead of memcmp
authorDavid Kershner <david.kershner@unisys.com>
Wed, 27 Sep 2017 17:14:14 +0000 (13:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Sep 2017 09:17:13 +0000 (11:17 +0200)
The function publish_vbus_dev_info was doing a memcmp of guids. It should
be using the kernel provided guid_equal function instead.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorbus_main.c

index f8236da94f02c27d4cc01393a3146f4aae7b0683..b1875818faa973b2096bc0288fa7358da6bf74e1 100644 (file)
@@ -855,9 +855,8 @@ static void publish_vbus_dev_info(struct visor_device *visordev)
         * type name
         */
        for (i = 0; visordrv->channel_types[i].name; i++) {
-               if (memcmp(&visordrv->channel_types[i].guid,
-                          &visordev->channel_type_guid,
-                          sizeof(visordrv->channel_types[i].guid)) == 0) {
+               if (guid_equal(&visordrv->channel_types[i].guid,
+                              &visordev->channel_type_guid)) {
                        chan_type_name = visordrv->channel_types[i].name;
                        break;
                }