Red Hat has been actively lobbying against software patents for years, a stance that has earned it the goodwill in the open source community (whose goodwill Google also cultivates) and no apparent ill effects.
FORBES: Google Should Publicly Oppose Software Patents