diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c index 207a3bd68559..1be47ad6441b 100644 --- a/drivers/mfd/qcom_rpm.c +++ b/drivers/mfd/qcom_rpm.c @@ -495,6 +495,8 @@ static int qcom_rpm_probe(struct platform_device *pdev) } match = of_match_device(qcom_rpm_of_match, &pdev->dev); + if (!match) + return -ENODEV; rpm->data = match->data; res = platform_get_resource(pdev, IORESOURCE_MEM, 0);