Commit 8e33f48c authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: visorbus: Remove gotos in visorbus_match

Gotos in visorbus_match are not needed.
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarTimothy Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 78af1aef
...@@ -182,7 +182,6 @@ static int ...@@ -182,7 +182,6 @@ static int
visorbus_match(struct device *xdev, struct device_driver *xdrv) visorbus_match(struct device *xdev, struct device_driver *xdrv)
{ {
uuid_le channel_type; uuid_le channel_type;
int rc = 0;
int i; int i;
struct visor_device *dev; struct visor_device *dev;
struct visor_driver *drv; struct visor_driver *drv;
...@@ -190,26 +189,23 @@ visorbus_match(struct device *xdev, struct device_driver *xdrv) ...@@ -190,26 +189,23 @@ visorbus_match(struct device *xdev, struct device_driver *xdrv)
dev = to_visor_device(xdev); dev = to_visor_device(xdev);
drv = to_visor_driver(xdrv); drv = to_visor_driver(xdrv);
channel_type = visorchannel_get_uuid(dev->visorchannel); channel_type = visorchannel_get_uuid(dev->visorchannel);
if (visorbus_forcematch) {
rc = 1;
goto away;
}
if (visorbus_forcenomatch)
goto away;
if (visorbus_forcematch)
return 1;
if (visorbus_forcenomatch)
return 0;
if (!drv->channel_types) if (!drv->channel_types)
goto away; return 0;
for (i = 0; for (i = 0;
(uuid_le_cmp(drv->channel_types[i].guid, NULL_UUID_LE) != 0) || (uuid_le_cmp(drv->channel_types[i].guid, NULL_UUID_LE) != 0) ||
(drv->channel_types[i].name); (drv->channel_types[i].name);
i++) i++)
if (uuid_le_cmp(drv->channel_types[i].guid, if (uuid_le_cmp(drv->channel_types[i].guid,
channel_type) == 0) { channel_type) == 0)
rc = i + 1; return i + 1;
goto away;
} return 0;
away:
return rc;
} }
/** This is called when device_unregister() is called for the bus device /** This is called when device_unregister() is called for the bus device
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment