diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-04-29 23:11:38 +0200 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2008-04-29 23:11:38 +0200 |
commit | ee56d977423a58b53fd0fc1ef0aca0c9cb564c53 (patch) | |
tree | 343b2427127b4fcc98c35d5d729c309b1f42e27a /drivers/i2c/busses/i2c-amd756-s4882.c | |
parent | 306f39f8f2ecf896ae761748843b148b90d3494d (diff) | |
download | blackbird-op-linux-ee56d977423a58b53fd0fc1ef0aca0c9cb564c53.tar.gz blackbird-op-linux-ee56d977423a58b53fd0fc1ef0aca0c9cb564c53.zip |
i2c-amd756-s4882: Fix an error path
If initialization fails, we want to restore the physical bus, not delete
it again.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-amd756-s4882.c')
-rw-r--r-- | drivers/i2c/busses/i2c-amd756-s4882.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c index e5e96c817566..c38a0a112208 100644 --- a/drivers/i2c/busses/i2c-amd756-s4882.c +++ b/drivers/i2c/busses/i2c-amd756-s4882.c @@ -1,7 +1,7 @@ /* * i2c-amd756-s4882.c - i2c-amd756 extras for the Tyan S4882 motherboard * - * Copyright (C) 2004 Jean Delvare <khali@linux-fr.org> + * Copyright (C) 2004, 2008 Jean Delvare <khali@linux-fr.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -231,7 +231,8 @@ ERROR2: kfree(s4882_adapter); s4882_adapter = NULL; ERROR1: - i2c_del_adapter(&amd756_smbus); + /* Restore physical bus */ + i2c_add_adapter(&amd756_smbus); ERROR0: return error; } |