Re: [PATCH v3 4/6] crypto: ti - add driver for MCRC64 engine

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

 



…
> +++ b/drivers/crypto/ti/mcrc64.c
…
> +static int mcrc64_probe(struct platform_device *pdev)
> +{
…
> +	platform_set_drvdata(pdev, dev_data);
> +
> +	spin_lock(&mcrc64_dev_list.lock);
> +	list_add(&dev_data->list, &mcrc64_dev_list.dev_list);
> +	spin_unlock(&mcrc64_dev_list.lock);
> +
> +	mutex_lock(&refcnt_lock);
> +	if (!refcnt) {
> +		ret = crypto_register_shashes(algs, ARRAY_SIZE(algs));
…
> +	}
> +	refcnt++;
> +	mutex_unlock(&refcnt_lock);
…

Would you become interested to apply lock guards?
https://elixir.bootlin.com/linux/v6.10-rc2/source/include/linux/cleanup.h#L124

Regards,
Markus





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux