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]

 



This is for linux-next as this is not merged to mainline.

On Sat, 2023-03-25 at 14:08 +0300, 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>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>

> ---
>  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]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux