summaryrefslogtreecommitdiff
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2017-09-27 13:14:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-28 11:17:14 +0200
commit6c073dabce18f600d9422f8921df8364bf850fff (patch)
tree7c7eb952f93aa640fb31dcd269c72e3b6f8f020e /drivers/staging/unisys
parentb11dffc48186d0bd5617f0428b832a580a7930c9 (diff)
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: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 416e74147141..80a078128bd1 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -309,7 +309,6 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
{
struct device *dev;
struct device *dev_start = NULL;
- struct visor_device *vdev = NULL;
struct visor_busdev id = {
.bus_no = bus_no,
.dev_no = 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 = bus_find_device(&visorbus_type, dev_start, (void *)&id,
match_visorbus_dev_by_id);
- if (dev)
- vdev = to_visor_device(dev);
- return vdev;
+ if (!dev)
+ return NULL;
+ return to_visor_device(dev);
}
static void controlvm_init_response(struct controlvm_message *msg,