Height of tree complexity

What will be the complexity if i use following to cal diameter?
int dia=0;//global variable
int diameter(node* root)
{
if(root==NULL)
return 0;
int lh=diameter(root->left);
int rh=diameter(root->right);
dia=max(dia,(lh+rh));
return max(lh,rh)+1;
}