Commit 710ddfbf authored by Dan Carpenter's avatar Dan Carpenter Committed by Hans de Goede

platform/x86: ISST: unlock on error path in tpmi_sst_init()

Call mutex_unlock(&isst_tpmi_dev_lock) before returning on this
error path.

Fixes: d805456c ("platform/x86: ISST: Enumerate TPMI SST and create framework")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/dcdebbb7-7de6-4d04-8e7a-43d5ca043484@kili.mountainReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 3a2f2756
......@@ -1399,8 +1399,10 @@ int tpmi_sst_init(void)
isst_common.sst_inst = kcalloc(topology_max_packages(),
sizeof(*isst_common.sst_inst),
GFP_KERNEL);
if (!isst_common.sst_inst)
return -ENOMEM;
if (!isst_common.sst_inst) {
ret = -ENOMEM;
goto init_done;
}
memset(&cb, 0, sizeof(cb));
cb.cmd_size = sizeof(struct isst_if_io_reg);
......
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