msm: kgsl: Make the querying of ARC values more robust

Check for an error condition when getting the length of
the cmddb ARC value table. Also use the length of the
table as the condition for looping through the values.
Add a comment to make the code more understandable.

CRs-Fixed: 2085877
Change-Id: Iae377abb8dbd2d12b57ec14084d0a75a06670e1c
Signed-off-by: Kyle Piefer <kpiefer@codeaurora.org>
1 file changed