]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
phy: phy-can-transceiver: Check driver match and driver data against NULL
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 13 May 2026 22:01:26 +0000 (00:01 +0200)
committerVinod Koul <vkoul@kernel.org>
Thu, 14 May 2026 15:32:21 +0000 (21:02 +0530)
commitebee9004cc0200b2b708ebf7ac625d35c71c049f
tree1a00c5e16e38799722822daeb7f1b736dfd29c1e
parent1cab8fba5073962712fae3b763417af95ccf476a
phy: phy-can-transceiver: Check driver match and driver data against NULL

Every platform driver can be forced to match a device that doesn't
match its list of device IDs because of device_match_driver_override()
so platform drivers that rely on the existence of a device's driver
data need to verify its presence.

Accordingly, add requisite match and driver data checks against NULL
to the driver where they are missing.

Fixes: a4a86d273ff1 ("phy: phy-can-transceiver: Add support for generic CAN transceiver driver")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260513220336.369628-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/phy-can-transceiver.c