diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-11-08 00:11:33 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2010-11-11 12:32:07 -0500 |
commit | f7334b4ca9108a86b64fbd0f435f44b2113ee053 (patch) | |
tree | acbad84c001c49cf9491c4c84a0bed5a5b78b9a1 | |
parent | f6614b7bb405a9b35dd28baea989a749492c46b2 (diff) |
hwmon: (adt7470) Return proper error code for adt7470_probe()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
-rw-r--r-- | drivers/hwmon/adt7470.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c index 9e775717abb7..87d92a56a939 100644 --- a/drivers/hwmon/adt7470.c +++ b/drivers/hwmon/adt7470.c | |||
@@ -1286,8 +1286,10 @@ static int adt7470_probe(struct i2c_client *client, | |||
1286 | init_completion(&data->auto_update_stop); | 1286 | init_completion(&data->auto_update_stop); |
1287 | data->auto_update = kthread_run(adt7470_update_thread, client, | 1287 | data->auto_update = kthread_run(adt7470_update_thread, client, |
1288 | dev_name(data->hwmon_dev)); | 1288 | dev_name(data->hwmon_dev)); |
1289 | if (IS_ERR(data->auto_update)) | 1289 | if (IS_ERR(data->auto_update)) { |
1290 | err = PTR_ERR(data->auto_update); | ||
1290 | goto exit_unregister; | 1291 | goto exit_unregister; |
1292 | } | ||
1291 | 1293 | ||
1292 | return 0; | 1294 | return 0; |
1293 | 1295 | ||