usb: gadget: net2272: cleanup pci_register_driver() error path
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 29 Jun 2011 13:41:54 +0000 (16:41 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Jul 2011 21:27:07 +0000 (14:27 -0700)
commite4fe056ed3a350ec569aa25014a0982883bc03c1
treef687114b484e9e33e12dffbac288352814bc761c
parent7eca4c5a8b73f22ad16ad6e76b901351732355da
usb: gadget: net2272: cleanup pci_register_driver() error path

In case pci_register_driver() fails it error will be 0 in case
platform_driver_register() was fine. Also without PCI
pci_register_driver() evaluates to 1 which is well, special. If
platform_driver_register() returns EINVAL or EBUSY we end up with 0.

Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/net2272.c