提交 cf1199f7 编写于 作者: L LABBE Corentin 提交者: Lee Jones

mfd: qcom_rpm: Fix a possible NULL dereference

of_match_device could return NULL, and so cause a NULL pointer
dereference later.
Signed-off-by: NLABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 bdd5dcf5
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册