In the patent war between two of the largest consumer electronics companies in the world, Samsung and Apple, Apple won another victory yesterday as US judge Lucy Koh kept in place a ban on sales of Samsung’s Galaxy Tab 10.1 tablet.

What’s more: last Friday, Judge Koh placed a ban on sales of one of Samsung’s phones, the Galaxy Nexus.

The bad news for Samsung: if it doesn’t prevail when it takes on Apple in court on July 30, both products may never see the light of day again in the United States. The good news for Samsung: newer models of both products are unaffected by the patent dispute and a loss to Apple probably won’t have a material impact on Samsung’s finances.

But there’s bad news for everybody here: as Reuters’ Erin Geiger Smith notes, the type of pre-trial injunctions that Judge Koh slapped on Samsung’s products are rare, signaling that the patent wars that are sucking billions of dollars annually out of the United States economy may only get worse.

Case in point: Google’s Nexus 7 tablet was announced last week, and already Nokia is reportedly claiming that it infringes some of its patents. According to The Inquirer, Nokia isn’t expected to seek an injunction against the Nexus 7 (a la Apple and Samsung), but does want Google and its manufacturing partner ASUS to cough up cash for a license.

If this all seems patently absurd, that’s because it is. Forget about non-practicing patent trolls; some of the largest, most innovative technology companies in the world have taken a bad situation and seem intent on making it worse.

Fortunately, there are some glimmers of hope. A high-profile judge recently tossed a patent infringement lawsuit filed against Motorola Mobility by Apple. Calling Apple’s claims “silly,” Judge Richard Posner of the Seventh US Circuit Court of Appeals stated that the patent system was in “chaos” and suggested that serious reform was needed.

That reform, of course, isn’t something that a court can deliver. But lawsuit-happy corporations like Apple would probably do well to listen to Posner because the current situation isn’t just “silly”, it’s stupid. In many cases, the potential damages in these cases are so inconsequential (if they exist at all), and the distractions so high, that the lawsuits themselves have become the business world’s version of a professional fly-swatting contest.