commit | f4203e3032e5ae74c3e89df85a5a6d96022d0c49 | [log] [tgz] |
---|---|---|
author | Borislav Petkov <borislav.petkov@amd.com> | Tue Feb 01 17:19:56 2011 +0100 |
committer | Greg Kroah-Hartman <gregkh@suse.de> | Thu Feb 03 15:41:03 2011 -0800 |
tree | c1030cc10185144df78137ad2bf85ef03ede3d54 | |
parent | 1f7da214e26a8ee4fbb66af50e27147d5d115c5a [diff] |
sysdev: Do not register with sysdev when erroring on add When encountering an error while executing the driver's ->add method, we should cancel registration and unwind what we've regged so far. The low level ->add methods do return proper error codes but those aren't looked at in sysdev_driver_register(). Fix that by sharing the unregistering code. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>