can: fix probing and use of device_get_match_data()
Get series with b4
b4 am 20261114-fix-device_get_match_data-v1-0-2d82025e9646@pengutronix.de change-id 20261114-fix-device_get_match_data-11dc9cd85ec7Versions newest first
- v1 Latest4 patches 12 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | can: c_can: c_can_plat_probe(): reject devices without match datadrivers/ | +2 | 2 replies | |
| 2/4 | can: flexcan: flexcan_probe(): fix probing for m68k/coldfire and reject devices without match datadrivers/ | +5 | 2 replies | |
| 3/4 | can: xilinx_can: xcan_probe(): reject devices without match datadrivers/ | +2 | 1 reply | |
| 4/4 | can: rcar_canfd: rcar_canfd_probe(): reject devices without match datadrivers/ | +2 | 7 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Michal Simek |
|---|---|
| 1/4 | |
| 2/4 | |
| 3/4 | R-b |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH can 0/4] can: fix probing and use of device_get_match_data()
With patch 5e6c3454b405 ("net: can: Use device_get_match_data()") several CAN drivers were converted to device_get_match_data(). The author assumed that error checking for matching and match data is not necessary.
This misses the fact that that drivers on the platform bus can forcefully bound using driver_override and device_get_match_data() will return NULL.
By using device_get_match_data(), this change broke probing for m68k/coldfire, which still uses platform devices.
This series adds missing NULL pointer checks and fixes probing for the flexcan on m68k/coldfire.
---
Marc Kleine-Budde (4):
can: c_can: c_can_plat_probe(): reject devices without match data
can: flexcan: flexcan_probe(): fix probing for m68k/coldfire and reject devices without match data
can: xilinx_can: xcan_probe(): reject devices without match data
can: rcar_canfd: rcar_canfd_probe(): reject devices without match data
drivers/net/can/c_can/c_can_platform.c | 2 ++ drivers/net/can/flexcan/flexcan-core.c | 5 +++++ drivers/net/can/rcar/rcar_canfd.c | 2 ++ drivers/net/can/xilinx_can.c | 2 ++ 4 files changed, 11 insertions(+)
---
base-commit: ead6fa9a0ab194f02a2f36d634b193e9c5f9a1c6
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
change-id: 20261114-fix-device_get_match_data-11dc9cd85ec7
Best regards,
Signature · 1 line
Marc Kleine-Budde <[email protected]>