]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_ffa: Add missing remove callback to ffa_bus_type
authorSudeep Holla <sudeep.holla@arm.com>
Fri, 24 Sep 2021 09:28:58 +0000 (10:28 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 5 Oct 2021 09:39:46 +0000 (10:39 +0100)
commit59ddb08e8563061c20a58b0898dbafeb092f67ec
treecf26d757bd61e7a322c9dcdd70a898dc11ce7731
parentb901123b83fca756ffcd85ea50a6cd9637d66d0c
firmware: arm_ffa: Add missing remove callback to ffa_bus_type

Currently the arm_ffa firmware driver can be built as module and hence
all the users of FFA driver. If any driver on the ffa bus is removed or
unregistered, the remove callback on all the device bound to the driver
being removed should be callback. For that to happen, we must register
a remove callback on the ffa_bus which is currently missing. This results
in the probe getting called again without the previous remove callback
on a device which may result in kernel crash.

Fix the issue by registering the remove callback on the FFA bus.

Link: https://lore.kernel.org/r/20210924092859.3057562-1-sudeep.holla@arm.com
Fixes: bb3cb5813110 ("firmware: arm_ffa: Add initial FFA bus support for device enumeration")
Reported-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_ffa/bus.c