Staging: ipack/devices/ipoctal: avoid kernel oops when uninstalling
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 25 May 2012 08:03:03 +0000 (10:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jun 2012 05:20:29 +0000 (14:20 +0900)
commit597d473f163a1672262b845ede8a65afdf1b27c6
tree2484486e4f0808d3ba2c7033f9ae9e840d922a90
parentb2bc13c5e07501a0a4427b6a9eff8162aef5560a
Staging: ipack/devices/ipoctal: avoid kernel oops when uninstalling

When uninstalling a device, there is a loop of calls that produces, at the end,
two calls to __ipoctal_remove() function with the same ipack_device argument.

The first time works fine, but the second will fail in tty_unregister_driver()

To avoid this situation, the call to __ipoctal_remove() it is done only from the
ipack bus driver and not from the ipack device driver.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/devices/ipoctal.c