]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] Fix snd-powermac refcounting bugs
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 19 Jun 2007 04:37:39 +0000 (14:37 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 19 Jun 2007 04:54:56 +0000 (14:54 +1000)
commite2a12952c537fc88850be10780c6631830a1d4ce
tree8ca1aed7100da0f683cea3155a092c5252e2e8eb
parentd066ebb867cf316fa6cd07bd57145079f5a10a6e
[POWERPC] Fix snd-powermac refcounting bugs

The old snd-powermac driver has some serious refcounting issues when
initialisation fails, which is the case on all new machines with
a layout-id since those are handled by the new snd-aoa driver.

Some of those bugs seem to have been under the radar for some time
(like double pci_dev_put), but one was actually added in 2.6.22 with
Stephen attempt at teaching refcounting to the driver which didn't
do it at all.

This patch fixes both, thus removing all sort of kref errors that
would happen if that driver gets loaded on a G5 machine or a recent
PowerBook due to OF nodes left around with a 0 refcount.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
sound/ppc/pmac.c