[PATCH 6.6 182/290] sock: Correct error checking condition for (assign|release)_proto_idx()