Commit e32e28ed authored by Russell King's avatar Russell King Committed by Russell King

[DRIVER MODEL] Add missing driver_unregister in i2c-s3c2410 failure path.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bbbf508d
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment