From: Andrew Morton 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 Cc: Dmitry Torokhov Signed-off-by: Andrew Morton --- drivers/input/touchscreen/ads7846.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/input/touchscreen/ads7846.c~drivers-input-touchscreen-ads7846c-fix-uninitialized-var-warning drivers/input/touchscreen/ads7846.c --- a/drivers/input/touchscreen/ads7846.c~drivers-input-touchscreen-ads7846c-fix-uninitialized-var-warning +++ a/drivers/input/touchscreen/ads7846.c @@ -213,7 +213,7 @@ static int ads7846_read12_ser(struct dev struct ads7846 *ts = dev_get_drvdata(dev); struct ser_req *req = kzalloc(sizeof *req, GFP_KERNEL); int status; - int sample; + int uninitialized_var(sample); int use_internal; if (!req) _