checkpatch: exclude lib/posix/*.c from negative errno rule

The `USE_NEGATIVE_ERRNO` rule consistently generates false
positives when working with certain areas of POSIX.

It makes sense to disable this check for the POSIX API
rather than requiring merge superpowers constantly. That
way, we can merge as per usual after sufficient approvals
rather than waiting for someone with merge superpowers to
override / manually merge.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 904cb08..6e55520 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5014,8 +5014,11 @@
 		if ($sline =~ /\breturn(?:\s*\(+\s*|\s+)(E[A-Z]+)(?:\s*\)+\s*|\s*)[;:,]/) {
 			my $name = $1;
 			if ($name ne 'EOF' && $name ne 'ERROR') {
-				WARN("USE_NEGATIVE_ERRNO",
-				     "return of an errno should typically be negative (ie: return -$1)\n" . $herecurr);
+				# only print this warning if not dealing with 'lib/posix/*.c'
+				if ($realfile =~ /.*\/lib\/posix\/*.c/) {
+					WARN("USE_NEGATIVE_ERRNO",
+						"return of an errno should typically be negative (ie: return -$1)\n" . $herecurr);
+				}
 			}
 		}