[PATCH 5.15 333/411] sock: Correct error checking condition for (assign|release)_proto_idx()