Fixed coredump due to accessing empty list
Fixed coredump due to accessing empty list

The code previously assumed the list returned would have data in
it, which would cause a core dump when it did not.  Even when
a non zero return code was sent back, the code never got to that.

With the reorg, non-zero return codes are now caught first and
an empty list is handled.

Signed-off-by: Jason Albert <fa03034561e2b166380dd3e144e93f10ef6a69c2@us.ibm.com>

mklight/eCMD,open-power/eCMD,open-power/eCMD,mklight/eCMD,mklight/eCMD,mklight/eCMD,mklight/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD