浏览代码

Input: ads7846 - fix uninitialized var warning

drivers/input/touchscreen/ads7846.c: In function 'ads7846_read12_ser':
drivers/input/touchscreen/ads7846.c:216: warning: 'sample' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Andrew Morton 17 年之前
父节点
当前提交
05be5fc4c7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/input/touchscreen/ads7846.c

+ 1 - 1
drivers/input/touchscreen/ads7846.c

@@ -213,7 +213,7 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)
 	struct ads7846		*ts = dev_get_drvdata(dev);
 	struct ads7846		*ts = dev_get_drvdata(dev);
 	struct ser_req		*req = kzalloc(sizeof *req, GFP_KERNEL);
 	struct ser_req		*req = kzalloc(sizeof *req, GFP_KERNEL);
 	int			status;
 	int			status;
-	int			sample;
+	int			uninitialized_var(sample);
 	int			use_internal;
 	int			use_internal;
 
 
 	if (!req)
 	if (!req)