firmware: qcom_scm: Check for NULL before dereferencing __scm
The function qcom_scm_mem_protect_region_id 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_mem_protect_region_id
before qcom_scm driver is even probed. Hence, check for NULL before
dereferencing it.
Change-Id: I1a9eba6d45ba8ebf73da80bca984b4dfad05042e
Signed-off-by:
Ashok Vuyyuru <avuyyuru@codeaurora.org>
Loading
Please register or sign in to comment