Char: mxser, call pci_disable_device from probe/remove
commitdf480518a688f0d28f7e7de69abe6a441d1c2c64
authorJiri Slaby <jslaby@suse.cz>
Fri, 3 Sep 2010 08:31:37 +0000 (3 10:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:20:02 +0000 (22 10:20 -0700)
tree96c23d7a1ec5dc4774e9429292e27ba3f55b3654
parent24b4b67d17c308aaa956b73ab1e88190f6642bbe
Char: mxser, call pci_disable_device from probe/remove

Vasiliy found that pci_disable_device is not called on fail paths in
mxser_probe. Actually, it is called from nowhere in the driver.

There are three changes needed:
1) don't use pseudo-generic mxser_release_res. Let's use it only from
   ISA paths from now on. All the pci stuff is moved to probe and
   remove PCI-related functions.
2) reorder fail-paths in the probe function so that it makes sense and
   we can call them from the sequential code naturally (the further we
   are the earlier label we go to).
3) add pci_disable_device both to mxser_probe and mxser_remove.

There is a nit of adding CONFIG_PCI ifdef to mxser_remove. it is
because this driver supports ISA-only compilations and it would choke
up on the newly added calls now.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/mxser.c