diff options
author | Akash Asthana <akashast@codeaurora.org> | 2020-07-17 20:02:22 +0530 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-07-20 13:11:15 -0700 |
commit | 03c900b3be116003ccd0e798431f6d0c25ff6729 (patch) | |
tree | d69653b99c19c5a1c449ddeb8c04031361435c4a /drivers/ptp/idt8a340_reg.h | |
parent | 4a3107f61f1ce2c8ccd4dde8ae655ae3f2996f35 (diff) | |
download | linux-03c900b3be116003ccd0e798431f6d0c25ff6729.tar.bz2 |
soc: qcom: geni: Fix NULL pointer dereference
pdev struct doesn't exits for the devices whose status are disabled
from DT node, in such cases NULL is returned from 'of_find_device_by_node'
Later when we try to get drvdata from pdev struct NULL pointer dereference
is triggered.
Add a NULL check for return values to fix the issue.
We were hitting this issue when one of QUP is disabled.
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Fixes: 048eb908a1f2 ("soc: qcom-geni-se: Add interconnect support to fix earlycon crash")
Reported-by: Sai Prakash Ranjan <saipraka@codeaurora.org>
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
Link: https://lore.kernel.org/r/1594996342-26964-1-git-send-email-akashast@codeaurora.org
[bjorn: s/wrapper_pdev/pdev/]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/ptp/idt8a340_reg.h')
0 files changed, 0 insertions, 0 deletions