浏览代码

Input: as5011 - fix error return code in as5011_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Wei Yongjun 12 年之前
父节点
当前提交
67b3bfd0c2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/input/joystick/as5011.c

+ 1 - 0
drivers/input/joystick/as5011.c

@@ -288,6 +288,7 @@ static int as5011_probe(struct i2c_client *client,
 	if (irq < 0) {
 		dev_err(&client->dev,
 			"Failed to get irq number for button gpio\n");
+		error = irq;
 		goto err_free_button_gpio;
 	}