mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
[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
@ -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 New Issue
Block a user