1
0
Fork 0

HSI: omap_ssi: Don't jump to free ID in ssi_add_controller()

[ Upstream commit 41fff6e19b ]

In current code, it jumps to ida_simple_remove() when ida_simple_get()
failes to allocate an ID. Just return to fix it.

Fixes: 0fae198988 ("HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Jing Xiangfeng 2020-10-12 10:56:43 +08:00 committed by Greg Kroah-Hartman
parent ec30659ea6
commit 15305a5b10
1 changed files with 1 additions and 1 deletions

View File

@ -355,7 +355,7 @@ static int ssi_add_controller(struct hsi_controller *ssi,
err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL);
if (err < 0)
goto out_err;
return err;
ssi->id = err;
ssi->owner = THIS_MODULE;