summaryrefslogtreecommitdiff
path: root/drivers/phy/phy-can-transceiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/phy/phy-can-transceiver.c')
-rw-r--r--drivers/phy/phy-can-transceiver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c
index f59caff4b3d4..e09ce1a86f5a 100644
--- a/drivers/phy/phy-can-transceiver.c
+++ b/drivers/phy/phy-can-transceiver.c
@@ -122,6 +122,9 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
return -ENOMEM;
match = of_match_node(can_transceiver_phy_ids, pdev->dev.of_node);
+ if (!match || !match->data)
+ return -ENODEV;
+
drvdata = match->data;
mux_state = devm_mux_state_get_optional(dev, NULL);