summaryrefslogtreecommitdiff
path: root/drivers/hsi
diff options
context:
space:
mode:
authorJing Xiangfeng <jingxiangfeng@huawei.com>2020-10-12 10:56:43 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:51:13 +0100
commit15305a5b103dddbfec7ccc3f715e76b001b5c41f (patch)
tree2eccd3c5105092d4703dbea4a7d13630a933826f /drivers/hsi
parentec30659ea631a5a82f26e00289ac618741c66cb2 (diff)
downloadlinux-15305a5b103dddbfec7ccc3f715e76b001b5c41f.tar.gz
linux-15305a5b103dddbfec7ccc3f715e76b001b5c41f.tar.bz2
linux-15305a5b103dddbfec7ccc3f715e76b001b5c41f.zip
HSI: omap_ssi: Don't jump to free ID in ssi_add_controller()
[ Upstream commit 41fff6e19bc8d6d8bca79ea388427c426e72e097 ] In current code, it jumps to ida_simple_remove() when ida_simple_get() failes to allocate an ID. Just return to fix it. Fixes: 0fae198988b8 ("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>
Diffstat (limited to 'drivers/hsi')
-rw-r--r--drivers/hsi/controllers/omap_ssi_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
index 4bc4a201f0f6..2be9c01e175c 100644
--- a/drivers/hsi/controllers/omap_ssi_core.c
+++ b/drivers/hsi/controllers/omap_ssi_core.c
@@ -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;