projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdd5dcf
)
mfd: qcom_rpm: Fix a possible NULL dereference
author
LABBE Corentin
<clabbe.montjoie@gmail.com>
Thu, 12 Nov 2015 07:49:59 +0000
(08:49 +0100)
committer
Lee Jones
<lee.jones@linaro.org>
Fri, 4 Dec 2015 08:46:23 +0000
(08:46 +0000)
of_match_device could return NULL, and so cause a NULL pointer
dereference later.
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/qcom_rpm.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mfd/qcom_rpm.c
b/drivers/mfd/qcom_rpm.c
index 207a3bd6855979c9f3299b834889870bbb249b34..1be47ad6441bfa879a3efadbf8fada0d38b673ef 100644
(file)
--- 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);