浏览代码

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>
Axel Lin 14 年之前
父节点
当前提交
f7334b4ca9
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/hwmon/adt7470.c

+ 3 - 1
drivers/hwmon/adt7470.c

@@ -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;