]> git.baikalelectronics.ru Git - kernel.git/commit
HSI: omap_ssi_core: Fix error handling in ssi_init()
authorYuan Can <yuancan@huawei.com>
Thu, 24 Nov 2022 11:33:32 +0000 (11:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:28 +0000 (11:41 +0100)
commit468b230393988b94c5ade8b3af014d27c6fd6ce4
tree009de61df0fc08713a1ee5c294de12c8cbfd6a9c
parent2de884e23b60e1973b388a7a52dabc1184f2aa6c
HSI: omap_ssi_core: Fix error handling in ssi_init()

[ Upstream commit 3ffa9f713c39a213a08d9ff13ab983a8aa5d8b5d ]

The ssi_init() returns the platform_driver_register() directly without
checking its return value, if platform_driver_register() failed, the
ssi_pdriver is not unregistered.
Fix by unregister ssi_pdriver when the last platform_driver_register()
failed.

Fixes: 149a91e7d758 ("HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hsi/controllers/omap_ssi_core.c