I think you have to be pretty smart to be really funny.
In your opinion, naturally, because really smart people generally prefer really smart humor. Any link between intelligence and humor dissolves once you remember that Martin Lawrence had an extremely successful comedy career.
Then again, I've attended Mensa gatherings, and what generally passed for humor there was lame puns... like the kind I didn't find very funny in the joke books I could check out from the school library in third grade. I groaned a lot.