staging: unisys: visorbus: just check for GUID
authorDavid Kershner <david.kershner@unisys.com>
Wed, 30 Aug 2017 17:36:32 +0000 (13:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 16:17:40 +0000 (18:17 +0200)
Every channel_type must have a valid GUID, checking for the name was just
redundant.

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 0957eaa247c48939fb46f62a9c20723721997776..a95901ca5b491008112c1f7415855ddd83ef45d6 100644 (file)
@@ -151,9 +151,7 @@ static int visorbus_match(struct device *xdev, struct device_driver *xdrv)
        if (!drv->channel_types)
                return 0;
 
-       for (i = 0;
-            !guid_is_null(&drv->channel_types[i].guid) || drv->channel_types[i].name;
-            i++)
+       for (i = 0; !guid_is_null(&drv->channel_types[i].guid); i++)
                if (guid_equal(&drv->channel_types[i].guid, channel_type))
                        return i + 1;