diff --git a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.C b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.C
index cfe84176a5da10506ada5da420e9eaad87d77247..1f9051a30f0c0d50889cc22f83dc580410b5f94f 100644
--- a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.C
+++ b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.C
@@ -170,7 +170,7 @@ Foam::label Foam::primitiveEntry::startLineNumber() const
 
     if (tokens.size())
     {
-        tokens.first().lineNumber();
+        return tokens.first().lineNumber();
     }
 
     return -1;