driver core: platform: remove misleading err_alloc label
authorJohannes Berg <johannes.berg@intel.com>
Fri, 1 Mar 2019 12:24:47 +0000 (13:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2019 17:08:06 +0000 (18:08 +0100)
commit36cf3b1363f464c40f6ce647d3ac0ae9617d5fbc
tree1de22749783d9a27511f50ae1d51e965ce6ade36
parent2c1ea6abde8884208a9b94254740ae4597c62000
driver core: platform: remove misleading err_alloc label

In platform_device_register_full() the err_alloc label is
misleading, we only ever jump to it if the pdev is NULL,
but it then proceeds to free it, which is a no-op.

Remove the label and simply exit the function immediately.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/platform.c