Skip to content

Commit

Permalink
hwmon: (adt7470) Return proper error code for adt7470_probe()
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
  • Loading branch information
Axel Lin authored and Guenter Roeck committed Nov 11, 2010
1 parent f6614b7 commit f7334b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/hwmon/adt7470.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,8 +1286,10 @@ static int adt7470_probe(struct i2c_client *client,
init_completion(&data->auto_update_stop);
data->auto_update = kthread_run(adt7470_update_thread, client,
dev_name(data->hwmon_dev));
if (IS_ERR(data->auto_update))
if (IS_ERR(data->auto_update)) {
err = PTR_ERR(data->auto_update);
goto exit_unregister;
}

return 0;

Expand Down

0 comments on commit f7334b4

Please sign in to comment.