platform-drivers: msm: sps: improve robustness of SPS driver

Add checking of null pointer and array index boundary

Change-Id: I5a8d044af791897c7e728d0a870069b1c7b24acb
Signed-off-by: Yan He <yanhe@codeaurora.org>
4 files changed