Re: [PATCH -next] firmware: arm_scmi: optee: Fix missing mutex_init()

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

 



On Tue, 23 Nov 2021 at 09:23, Wei Yongjun <weiyongjun1@xxxxxxxxxx> wrote:
>
> The driver allocates the mutex but not initialize it.
> Use mutex_init() on it to initialize it correctly.
>
> Fixes: 5f90f189a052 ("firmware: arm_scmi: Add optee transport")
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
> ---
>  drivers/firmware/arm_scmi/optee.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c
> index d9819b0197ec..901737c9f5f8 100644
> --- a/drivers/firmware/arm_scmi/optee.c
> +++ b/drivers/firmware/arm_scmi/optee.c
> @@ -506,6 +506,7 @@ static int scmi_optee_service_probe(struct device *dev)
>         agent->dev = dev;
>         agent->tee_ctx = tee_ctx;
>         INIT_LIST_HEAD(&agent->channel_list);
> +       mutex_init(&agent->mu);
>
>         ret = get_capabilities(agent);
>         if (ret)
>

`Reviewed-by: Etienne Carriere <etienne.carriere@xxxxxxxxxx>`

Indeed. Thanks for the fix.
Etienne



[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