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:
Родитель
f6b6a8ec9a
Коммит
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче