soc: qcom: glink_ssr: Register link state callbacks after adding to list
During probe(), the driver registers link state callbacks for each
subsystem information structure, and then adds structures to a list. In
the link state callback, this list is queried for the structure. If a
callback is triggered before the structure is added to the list, a NULL
pointer dereference can occur.
Only register link state callbacks after adding the subsystem
information structure to the list, and add a check in the link state
callback to see if the structure obtained in the list is NULL before
dereferencing it.
Change-Id: I18d317ba1f70f0051a4adb83c74142d3bd33a1ae
Signed-off-by:
Steven Cahail <scahail@codeaurora.org>
Loading
Please register or sign in to comment