[PATCH 6.12 267/414] sock: Correct error checking condition for (assign|release)_proto_idx()