diff options
author | Samuel Iglesias Gonsalvez <siglesias@igalia.com> | 2012-05-25 08:03:05 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-07 05:20:30 (GMT) |
commit | 20cf70082440ffabbec5c275726f68fe53872c94 (patch) | |
tree | aae44c0392235ee427d3a29d833d881ec9dc06f1 /drivers/staging/ipack | |
parent | ca2d2bb6618396ec0a79b182fcd1591ef62b07cb (diff) | |
download | linux-20cf70082440ffabbec5c275726f68fe53872c94.tar.xz |
Staging: ipack/bridges/tpci200: fix kernel oops when uninstalling a device
When uninstalling a device, the call to the ipack_bus_ops remove() frees
resources in the ipack device driver but without unregistering the device.
It generates a kernel oops when somebody wants to unregister the device.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ipack')
-rw-r--r-- | drivers/staging/ipack/bridges/tpci200.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index e04cb8a..46127bc 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c @@ -751,23 +751,12 @@ out: return res; } -static void tpci200_slot_remove(struct tpci200_slot *slot) -{ - if ((slot->dev == NULL) || - (slot->dev->driver == NULL) || - (slot->dev->driver->ops == NULL) || - (slot->dev->driver->ops->remove == NULL)) - return; - - slot->dev->driver->ops->remove(slot->dev); -} - static void tpci200_uninstall(struct tpci200_board *tpci200) { int i; for (i = 0; i < TPCI200_NB_SLOT; i++) - tpci200_slot_remove(&tpci200->slots[i]); + tpci200_slot_unregister(tpci200->slots[i].dev); tpci200_unregister(tpci200); kfree(tpci200->slots); |