qcacld-3.0: Check for null before taking the DSC lock

Ic3121092c71d5c46e8521a775281ad2c45e3fe7d changed the driver-level DSC
context allocation method from static to dynamic. As a side effect, the
DSC driver lock needed a driver instance pointer instead of grabbing the
global context. However, many of the lock calls were updated to use the
input context pointer before it was validated.

Ensure the input context pointers are validated before using them to
grab the DSC driver lock.

Change-Id: Ifce2d603f3e9b7b7c0869a40f8632988a9509809
CRs-Fixed: 2327110
3 files changed