[PATCH 6.15 406/592] sock: Correct error checking condition for (assign|release)_proto_idx()