rapl components: coverity fixes
rapl components: coverity fixes

Reported/patched by Gary Mohr
-----------------------------
The rapl component also has 1 defect in a test case.  The complaint is that
there is code that can never be executed.  But this one is not as clear, it
says that you can not exit the do/while loop that preceeds a test of retval
until retval=0 which means the test can never be true.  The patch I am
providing is to again remove the if test and its contents.  But I am
concerned that the do/while loop preceeding the test could result in a hard
loop that would hang the test case forever.  It seems to me like something
should also be done to insure the loop will exit at some point.  Here is a
patch that provides at least part of the fix:
-----------------------------

arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,arm-hpc/papi