Re: [PATCH] can: mcp251xfd: reject devices without match data
From: Marc Kleine-Budde
Date: Wed Nov 18 2026 - 03:06:11 EST
On 25.09.2026 21:37:16, Jiale Yao wrote:
> A device bound through driver_override need not match an entry in the
> driver tables. In that case spi_get_device_match_data() returns NULL,
> but mcp251xfd_probe() dereferences the result while copying the device
> type data.
>
> Reject devices without match data before continuing probe.
>
> Fixes: 9cdae370c4ec ("can: mcp251xfd: simplify with spi_get_device_match_data()")
> Signed-off-by: Jiale Yao <yaojiale02@xxxxxxx>
This problem will be solved by Uwe's patch:
https://lore.kernel.org/all/20261116110853.3418077-2-u.kleine-koenig@xxxxxxxxxxxx/
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