Secondly, working code is good code compared to no code. "Make it work, make it good, make it fast" -- someone smart, possibly Linus.
If you can make things work then thats great, its an excellent start. There seems to be this assumption that you have to be brilliant to contribute "official patches". You don't. The most important thing is that you are able and willing to write code, code that works. Also important that you are willing to improve by continuing to work on it, and fix issues when they appear. If you have those two traits, it will go a long way.
And as stated by others, there really is tons of other things to do around a free software project apart from coding.