]> bbs.cooldavid.org Git - net-next-2.6.git/commit
jsm: fixing error if the driver fails to load
authorBreno Leitao <leitao@linux.vnet.ibm.com>
Thu, 25 Feb 2010 18:31:50 +0000 (15:31 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:43:24 +0000 (14:43 -0800)
commit137ee2f5d173a0e859e35bfb900261418eb88ace
treeb568beec3835a1a6f2c5ed2592aa39f721092ea8
parent54862ee005943d0fdb13d4e54220f234676e05f5
jsm: fixing error if the driver fails to load

Currently if the driver fails to register on port, the kernel
crashes with the following stack:

cpu 0x1: Vector: 300 (Data Access) at [c0000000e0303090]
    pc: c00000000039aa74: .__mutex_lock_slowpath+0x44/0x10c
    lr: c00000000039aa58: .__mutex_lock_slowpath+0x28/0x10c
[c0000000e03033c0c00000000026b074 .uart_remove_one_port+0xbc/0x16c
[c0000000e0303460d0000000000e0554 .jsm_remove_uart_port+0x8c/0x10c [jsm]
[c0000000e03034f0d0000000000dc034 .jsm_remove_one+0x34/0x108 [jsm]
[c0000000e0303590c0000000001f4aa0 .pci_device_remove+0x48/0x74
...

This patch just fixes the code flow to abort the load when an
error is detected.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/serial/jsm/jsm_tty.c