input: Fix errno handling convention

Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.

Also remove a few unnecessary errno assignments.
1 file changed