Skip to content

Commit

Permalink
HSI: omap_ssi: Don't jump to free ID in ssi_add_controller()
Browse files Browse the repository at this point in the history
[ Upstream commit 41fff6e ]

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

Fixes: 0fae198 ("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>
  • Loading branch information
hiss2018 authored and gregkh committed Dec 30, 2020
1 parent 38429d8 commit 9e363d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hsi/controllers/omap_ssi_core.c
Expand Up @@ -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;
Expand Down

0 comments on commit 9e363d1

Please sign in to comment.