[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>
This commit is contained in:
parent
bbbf508d64
commit
e32e28edc3
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue