Re: [PATCH] can: m_can: initialize spin lock on device probe
From: Marc Kleine-Budde
Date: Thu Apr 24 2025 - 09:12:17 EST
Hello Antonios,
On 24.04.2025 14:52:20, Antonios Salios wrote:
> The spin lock tx_handling_spinlock in struct m_can_classdev is not being
> initialized. This leads to bug complaints from the kernel, eg. when
> trying to send CAN frames with cansend from can-utils.
Thanks for your contribution, that's a good catch!
> This patch fixes that by initializing the spin lock in the corresponding
> device probe functions.
The spin_lock is only used in m_can.c, so it's better to be initialized
there.
Please add a fixes tag:
Fixes: 1fa80e23c150 ("can: m_can: Introduce a tx_fifo_in_flight counter")
I've also added Markus on Cc, who introduced the spin_lock.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature