[PATCH 6.1 426/508] sock: Correct error checking condition for (assign|release)_proto_idx()