mirror of
https://github.com/torvalds/linux.git
synced 2024-12-20 10:01:56 +00:00
staging: unisys: visorbus: Unregister driver on error
If there is an error in registering driver attributes, unregister the driver as well. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f6b6a8ec9a
commit
418627ddc6
@ -885,6 +885,8 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
rc = register_driver_attributes(drv);
|
||||
if (rc < 0)
|
||||
driver_unregister(&drv->driver);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(visorbus_register_visor_driver);
|
||||
|
Loading…
Reference in New Issue
Block a user