Commit 41fff6e1 authored by Jing Xiangfeng's avatar Jing Xiangfeng Committed by Sebastian Reichel

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

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

Fixes: 0fae1989 ("HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module")
Signed-off-by: default avatarJing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 3650b228
...@@ -355,7 +355,7 @@ static int ssi_add_controller(struct hsi_controller *ssi, ...@@ -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); err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL);
if (err < 0) if (err < 0)
goto out_err; return err;
ssi->id = err; ssi->id = err;
ssi->owner = THIS_MODULE; ssi->owner = THIS_MODULE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment