Fix mailbox clean up on inference request failure

When an inference request fails, the mailbox message registered for the
request is not unregistered, causing the mailbox's IDR to be left with
an entry for the message with a dangling pointer to the freed inference.
The dangling pointer later causes the mailbox clean up to crash when it
attempts to call the fail callback for the IDR entry.

The clean up for a failed inference request has now been fixed so it
unregisters the message from the mailbox.

Change-Id: Ida8015c88afee9cad074289be4d65947854c9e6b
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
diff --git a/kernel/ethosu_inference.c b/kernel/ethosu_inference.c
index 50007d0..6d3405d 100644
--- a/kernel/ethosu_inference.c
+++ b/kernel/ethosu_inference.c
@@ -385,6 +385,8 @@
 	while (inf->ifm_count-- > 0)
 		ethosu_buffer_put(inf->ifm[inf->ifm_count]);
 
+	ethosu_mailbox_deregister(mailbox, &inf->msg);
+
 kfree:
 	memset(inf, 0, sizeof(*inf));
 	devm_kfree(dev, inf);