diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-10-30 16:32:27 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-30 16:32:27 +0000 |
commit | e32e28edc3d894201e15b19df627af66023aa91f (patch) | |
tree | ac7f1bf0f55b6bc68ef931be7b6a7098f059d867 /drivers/i2c/busses/i2c-s3c2410.c | |
parent | bbbf508d6403f9dfeeb040d9cd7366e395632e59 (diff) |
[DRIVER MODEL] Add missing driver_unregister in i2c-s3c2410 failure path.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-s3c2410.c')
-rw-r--r-- | drivers/i2c/busses/i2c-s3c2410.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index a1268e534254..1b582262e677 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -918,8 +918,11 @@ static int __init i2c_adap_s3c_init(void) int ret; ret = driver_register(&s3c2410_i2c_driver); - if (ret == 0) - ret = driver_register(&s3c2440_i2c_driver); + if (ret == 0) { + ret = driver_register(&s3c2440_i2c_driver); + if (ret) + driver_unregister(&s3c2410_i2c_driver); + } return ret; } |