Delete the trailing whitespace (spaces or tabs) from end of each line.
awk '{sub(/[ \t]+$/, "");print}' filename