Fix coverity issues

:Release Notes:
Coverity issues fixing

:Detailed Notes:

:Testing Performed:

:QA Notes:

:Issues Addressed:
[GF-53276] powerd: Fix coverity issues

Open-webOS-DCO-1.0-Signed-off-by: Mykola Kryvonos <mykola.kryvonos@lge.com>

Change-Id: Ia4c9df9c6de75e7f6e277651e228024e4a5f651c
Reviewed-on: https://g2g.palm.com/4065
Reviewed-by: DCO Verification
Reviewed-by: Alexandr Smoktal <alexandr.smoktal@lge.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Reviewed-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Tested-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>