Commit 6c073dab authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: visorbus: keep the success path on the left side

If you can't find the dev, it is an error. Indent for the error, instead
of the success.
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b11dffc4
...@@ -309,7 +309,6 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no, ...@@ -309,7 +309,6 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
{ {
struct device *dev; struct device *dev;
struct device *dev_start = NULL; struct device *dev_start = NULL;
struct visor_device *vdev = NULL;
struct visor_busdev id = { struct visor_busdev id = {
.bus_no = bus_no, .bus_no = bus_no,
.dev_no = dev_no .dev_no = dev_no
...@@ -319,9 +318,9 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no, ...@@ -319,9 +318,9 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
dev_start = &from->device; dev_start = &from->device;
dev = bus_find_device(&visorbus_type, dev_start, (void *)&id, dev = bus_find_device(&visorbus_type, dev_start, (void *)&id,
match_visorbus_dev_by_id); match_visorbus_dev_by_id);
if (dev) if (!dev)
vdev = to_visor_device(dev); return NULL;
return vdev; return to_visor_device(dev);
} }
static void controlvm_init_response(struct controlvm_message *msg, static void controlvm_init_response(struct controlvm_message *msg,
......
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