Removed unnecessary loop and satisfied checkpatch

Signed-off-by: Haubrich <haubrich@de.ibm.com>