mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00: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