fix static analyzer warnings

Change-Id: I2e3b3b85eaf562f0bdf4e7793eb7f8df269099f7
Signed-off-by: Tsahi Asher <tasher@qce.qualcomm.com>