arm_mpam: resctrl: Call resctrl_exit() in the event of errors
All of MPAMs errors indicate a software bug, e.g. an out-of-bounds
partid has been generated. When this happens, the mpam driver
is disabled.
If resctrl_init() succeeded, also call resctrl_exit() to
remove resctrl.
mpam_devices.c calls mpam_resctrl_teardown_class() when a class
becomes incomplete, and can no longer be used by resctrl. If
resctrl was using this class, then resctrl_exit() is called.
This in turn removes the kernfs hierarchy from the filesystem
and free()s memory that was allocated by resctrl.
Signed-off-by:
James Morse <james.morse@arm.com>
Loading
Please register or sign in to comment