Skip to content

Commit 05be5fc

Browse files
akpm00dtor
authored andcommitted
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>
1 parent f178244 commit 05be5fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/input/touchscreen/ads7846.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)
213213
struct ads7846 *ts = dev_get_drvdata(dev);
214214
struct ser_req *req = kzalloc(sizeof *req, GFP_KERNEL);
215215
int status;
216-
int sample;
216+
int uninitialized_var(sample);
217217
int use_internal;
218218

219219
if (!req)

0 commit comments

Comments
 (0)