[PATCH AUTOSEL 4.19 090/205] rtnetlink: move type calculation out of loop