Skip to content

Commit b77b75f

Browse files
spandruvadajwrdegoede
authored andcommitted
platform/x86: ISST: Fix usage counter
On multi package system, the TPMI SST instance is getting allocated again as the usage counter is not getting incremented. Here the instance is allocated only when the usage count is zero. There is no need to allocate again. Increment usage ID on successful return from isst_if_cdev_register(). Signed-off-by: Srinivas Pandruvada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent fa5e68b commit b77b75f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,6 +1414,8 @@ int tpmi_sst_init(void)
14141414
ret = isst_if_cdev_register(ISST_IF_DEV_TPMI, &cb);
14151415
if (ret)
14161416
kfree(isst_common.sst_inst);
1417+
else
1418+
++isst_core_usage_count;
14171419
init_done:
14181420
mutex_unlock(&isst_tpmi_dev_lock);
14191421
return ret;

0 commit comments

Comments
 (0)