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>
{
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
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,