Patent trolls filed 40% of patent infringement lawsuits last year. I’m surprised the number is that low, honestly, but that is still a significant cost.
There are also moves by some companies to get rid of software patenting altogether, especially in the open source world. This is why I’ve released software under GPL v3 whenever possible. Version 3 is an improvement over version 2, including enhanced patent protection for consumers.