Skip to content
Commit 229e1254 authored by Mikael's avatar Mikael
Browse files

Fix double free in kernel driver probe clean up



If the probe function is past the NPU device registration when a failure
occurs, the device instance will be freed twice causing a crash. This
occurs because the device's release callback will free the device
instance when the device is unregistered and then the probe clean up
will attempt to free it again.

To resolve this, the probe will now only directly free the device
instance if the registration fails and otherwise let the device's
release callback handle it.

Change-Id: Iafe87e7ca44b91f8e0e2e870106a4b8c2a69dd8f
Signed-off-by: Mikael's avatarMikael Olsson <mikael.olsson@arm.com>
parent eb5a3281
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment