Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1122c7a authored by Patrick Pannuto's avatar Patrick Pannuto Committed by Bryan Huntsman
Browse files

Checkpatch: Print location when catching return code error



Display context so users can see where there error was

OLD:
	ERROR: illegal return value, please use an error code

NEW:
	ERROR: illegal return value, please use an error code
	#152: test.c:5:
	+	return -1;

Change-Id: I098004d9a5dbeb6c39b35b84ac94fd7a861849d7
Signed-off-by: default avatarPatrick Pannuto <ppannuto@codeaurora.org>
(cherry picked from commit 8d09803de5d629f3ebc9cb357a40b5937a5d171e)
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
parent 9fe4b954
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6220,7 +6220,7 @@ sub process {
# check for return codes on error paths
		if ($line =~ /\breturn\s+-\d+/) {
			ERROR("NO_ERROR_CODE",
			      "illegal return value, please use an error code");
			      "illegal return value, please use an error code\n" . $herecurr);
		}

# check for gcc specific __FUNCTION__