firmware: arm_scmi: Fix missing destroy_workqueue()
authorQinglang Miao <miaoqinglang@huawei.com>
Tue, 10 Nov 2020 07:42:21 +0000 (15:42 +0800)
committerSudeep Holla <sudeep.holla@arm.com>
Fri, 13 Nov 2020 11:16:01 +0000 (11:16 +0000)
commit6bbdb46c4b1bd57839c9c0a110bd81b0be0a4046
tree22e3fb7e7306e4e1c02a04d953e9a2d1ddcc9154
parent3cea11cd5e3b00d91caf0b4730194039b45c5891
firmware: arm_scmi: Fix missing destroy_workqueue()

destroy_workqueue is required before the return from scmi_notification_init
in case devm_kcalloc fails to allocate registered_protocols. Fix this by
simply moving registered_protocols allocation before alloc_workqueue.

Link: https://lore.kernel.org/r/20201110074221.41235-1-miaoqinglang@huawei.com
Fixes: bd31b249692e ("firmware: arm_scmi: Add notification dispatch and delivery")
Suggested-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/notify.c