mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
staging: vme_user: fix root device leak on init failure
Make sure to deregister and free the root device in case module
initialisation fails.
Fixes: 658bcdae9c ("vme: Adding Fake VME driver")
Cc: stable@vger.kernel.org # 4.9
Cc: Martyn Welch <martyn@welchs.me.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260424104910.2619349-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
254f49634e
commit
32c91e8ee0
@@ -1230,6 +1230,8 @@ err_master:
|
||||
err_driver:
|
||||
kfree(fake_bridge);
|
||||
err_struct:
|
||||
root_device_unregister(vme_root);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user