diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h
index abc9cb631c47ec44accd90c04137dffe944d284e..ba5983f34c42f8076f4416af164f229678ffc4e1 100644
--- a/net/8021q/vlan.h
+++ b/net/8021q/vlan.h
@@ -121,6 +121,7 @@ static inline unsigned int vlan_proto_idx(__be16 proto)
 		return VLAN_PROTO_8021AD;
 	default:
 		BUG();
+		return 0;
 	}
 }