Apple just released iOS 4.0.2 for iPhone 4, iPhone 3GS, iPhone 3G, iPod Touch 3G and iPod Touch 2G. You can download iOS 4.0.2 from iTunes now!
iPad users have also got the same fix as iOS 3.2.2 firmware update for iPad WiFi and iPad 3G.
iOS 4.0.2 update is now available for download from the iTunes store. Download iOS 4.0.2 is available for iPhone 4, iPhone 3G and iPhone 3GS and you all those who have factory unlocked devices (and not-jailbroken) can update it.
The iPhone Dev Team has asked everyone not to updatew it and wait for further details on if it is safe to update to the latest iOS 4.0.2 firmware update or not.