[PATCH 5.4 176/222] sock: Correct error checking condition for (assign|release)_proto_idx()