msm: camera: utils: Fix OOB read due to wrong kmd cmd buffer index

Add condition where kmd cmd buffer index is equal to number of
command buffers which may result in accessing memory out of bounds.

Change-Id: Iac73dae2b551ae93b9831514cfab8c0a5a1378b8
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
1 file changed