diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index 33a6aab53b69d67bd87f5f42ff928a2a4bf3f54c..e3c1600461436dfb9298e311830423e7ec0f861f 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -480,7 +480,7 @@ member_bitfield_declarator:
 
 attribute_opt:
 	/* empty */					{ $$ = NULL; }
-	| attribute_opt ATTRIBUTE_PHRASE
+	| attribute_opt ATTRIBUTE_PHRASE		{ $$ = $2; }
 	;
 
 enum_body: