Skip to content
Commit d6fcb3b9 authored by Daniel Ritz's avatar Daniel Ritz Committed by Linus Torvalds
Browse files

[PATCH] i2c-i801.c: don't pci_disable_device() after it was just enabled

Commit 02dd7ae2

 ("[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: default avatarDaniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f17a2686
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment