Re: [PATCH] platform/x86: ISST: unlock on error path in tpmi_sst_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 3/25/23 12:08, Dan Carpenter wrote:
> Call mutex_unlock(&isst_tpmi_dev_lock) before returning on this
> error path.
> 
> Fixes: d805456c712f ("platform/x86: ISST: Enumerate TPMI SST and create framework")
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
>  drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> index cdb56a18ea17..664d2ee60385 100644
> --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> @@ -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);




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux