[PATCH] i2c-i801.c: don't pci_disable_device() after it was just enabled
authorDaniel Ritz <daniel.ritz-ml@swissonline.ch>
Tue, 27 Jun 2006 16:40:54 +0000 (18:40 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 01:36:39 +0000 (18:36 -0700)
commitd6fcb3b9cf776e3f748709cd3091a72cb3855c29
tree1b60436804d31c9500662e3b84f4b33a0d9dac6d
parentf17a2686b11453680e9662ef8bdc8d948d0dce18
[PATCH] i2c-i801.c: don't pci_disable_device() after it was just enabled

Commit 02dd7ae2892e5ceff111d032769c78d3377df970 ("[PATCH] i2c-i801:
Merge setup function") has a missing return 0 in the _probe() function.
This means the error path is always executed and pci_disable_device() is
called even when the device just got successfully enabled.

Having the SMBus device disabled makes some systems (eg.
Fujitsu-Siemens Lifebook E8010) hang hard during power-off.

Intead of reverting the whole commit this patch fixes it up:
- don't ever call pci_disable_device(), also not in the _remove() function
  to avoid hangs
- fix missing pci_release_region() in error path

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/i2c/busses/i2c-i801.c