Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andrew Morton and committed by
Dmitry Torokhov
05be5fc4 f1782447

+1 -1
+1 -1
drivers/input/touchscreen/ads7846.c
··· 213 213 struct ads7846 *ts = dev_get_drvdata(dev); 214 214 struct ser_req *req = kzalloc(sizeof *req, GFP_KERNEL); 215 215 int status; 216 - int sample; 216 + int uninitialized_var(sample); 217 217 int use_internal; 218 218 219 219 if (!req)