From: Borislav Petkov Date: Tue, 1 Feb 2011 16:19:56 +0000 (+0100) Subject: sysdev: Do not register with sysdev when erroring on add X-Git-Tag: v2.6.39-rc1~471^2~41 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4203e3032e5ae74c3e89df85a5a6d96022d0c49;p=pandora-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed