Away is ambiguous when specifying error vs success. Make return labels more meaningful by marking them as error paths. Signed-off-by: David Kershner <david.kershner@xxxxxxxxxx> Signed-off-by: Timothy Sell <timothy.sell@xxxxxxxxxx> --- drivers/staging/unisys/visorbus/visorbus_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 6a228c8..b611836 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -978,7 +978,7 @@ create_visor_device(struct visor_device *dev) POSTCODE_LINUX_3(DEVICE_CREATE_FAILURE_PC, chipset_dev_no, DIAG_SEVERITY_ERR); rc = -EINVAL; - goto away; + goto err_put; } /* bus_id must be a unique name with respect to this bus TYPE @@ -1008,23 +1008,23 @@ create_visor_device(struct visor_device *dev) if (rc < 0) { POSTCODE_LINUX_3(DEVICE_ADD_PC, chipset_bus_no, DIAG_SEVERITY_ERR); - goto away; + goto err_put; } rc = register_devmajorminor_attributes(dev); if (rc < 0) { POSTCODE_LINUX_3(DEVICE_REGISTER_FAILURE_PC, chipset_dev_no, DIAG_SEVERITY_ERR); - goto away_unregister; + goto err_unregister; } list_add_tail(&dev->list_all, &list_all_device_instances); - return 0; + return 0; /* success: reference kept via unmatched get_device() */ -away_unregister: +err_unregister: device_unregister(&dev->device); -away: +err_put: put_device(&dev->device); return rc; } -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel