jsm: removing the uart structure and filename on error
authorBreno Leitao <leitao@linux.vnet.ibm.com>
Thu, 25 Feb 2010 18:31:49 +0000 (15:31 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:43:24 +0000 (14:43 -0800)
commit54862ee005943d0fdb13d4e54220f234676e05f5
treee72f8fdd0617a002f48128419793e5e228b75bf0
parenteec9fe7d1ab4a0dfac4cb43047a7657fffd0002f
jsm: removing the uart structure and filename on error

If jsm fails to load, then remove the uart stuff, otherwise,
the things (as files), will be there forever (even when the module
is unloaded). If you try to reload the module, the following message
appears:

kobject_add_internal failed for ttyn1 with -EEXIST, don't try to
register things with the same name in the same directory.

This patch remove the uart things when the driver fails.

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