pal: fix Static Code Analysis issues

fix reported P1 Static Code Analysis issues

Change-Id: If71552835b448ba8720d052bc5dfe63e3aa716c0
(cherry picked from commit 450733b3e44e3e2cc1a1c4aeca4c7d286e7523e1)
6 files changed