mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
firmware: qcom_scm: Check for NULL before dereferencing __scm
The function qcom_scm_get_sec_dump_state dereferences __scm without checking for NULL and could potentially lead to a NULL pointer exception. This scenario can happen if the clinet calls qcom_scm_get_sec_dump_state before qcom_scm driver is even probed. Hence, check for NULL before dereferencing it. Change-Id: Ic6f7c2b2d616645ea69a8c594c90dc01d689637f Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
This commit is contained in:
parent
7531776c2b
commit
54e781e95b
1 changed files with 1 additions and 1 deletions
|
|
@ -329,7 +329,7 @@ static const struct reset_control_ops qcom_scm_pas_reset_ops = {
|
|||
|
||||
int qcom_scm_get_sec_dump_state(u32 *dump_state)
|
||||
{
|
||||
return __qcom_scm_get_sec_dump_state(__scm->dev,
|
||||
return __qcom_scm_get_sec_dump_state(__scm ? __scm->dev : NULL,
|
||||
dump_state);
|
||||
}
|
||||
EXPORT_SYMBOL(qcom_scm_get_sec_dump_state);
|
||||
|
|
|
|||
Loading…
Reference in a new issue