From: Andrew Morton Date: Mon, 10 Mar 2008 10:08:40 +0000 (-0700) Subject: Input: ads7846 - fix uninitialized var warning X-Git-Tag: v2.6.25-rc7~108^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05be5fc4c75fd91c9601b5e697f94112f0f6482b;p=linux-2.6 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 Signed-off-by: Jiri Kosina Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 58934a40f5..57a1c28bf1 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/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 ser_req *req = kzalloc(sizeof *req, GFP_KERNEL); int status; - int sample; + int uninitialized_var(sample); int use_internal; if (!req)