mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-17 19:30:26 +00:00
Initialize the chip before registering it.
Drop useless local variable initialization. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3212 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
a51b72b468
commit
c1ff1bbd55
1 file changed
+4
-3
@@ -301,7 +301,7 @@ static int f71805f_detect(struct i2c_adapter *adapter, int address,
|
||||
{
|
||||
struct i2c_client *client;
|
||||
struct f71805f_data *data;
|
||||
int err = 0;
|
||||
int err;
|
||||
|
||||
if (!request_region(address, REGION_LENGTH, f71805f_driver.name)) {
|
||||
err = -EBUSY;
|
||||
@@ -329,6 +329,9 @@ static int f71805f_detect(struct i2c_adapter *adapter, int address,
|
||||
if ((err = i2c_attach_client(client)))
|
||||
goto exit_free;
|
||||
|
||||
/* Initialize the F71805F chip */
|
||||
f71805f_init_client(client);
|
||||
|
||||
/* Register a new directory entry in /proc */
|
||||
err = i2c_register_entry(client, "f71805f",
|
||||
f71805f_dir_table_template, THIS_MODULE);
|
||||
@@ -336,8 +339,6 @@ static int f71805f_detect(struct i2c_adapter *adapter, int address,
|
||||
goto exit_detach;
|
||||
data->sysctl_id = err;
|
||||
|
||||
/* Initialize the F71805F chip */
|
||||
f71805f_init_client(client);
|
||||
return 0;
|
||||
|
||||
exit_detach:
|
||||
|
||||
Reference in new issue
Block a user