You don't need to - if the favicon is place in the root at favicon.ico, browsers will automatically pick it up.
If you don't see it working, clear your cache etc, it does work without the markup. You only need to use the code if you want to call it something else, or put it on a CDN for instance.