Commit f91fd98b authored by Viktor Rosendahl's avatar Viktor Rosendahl Committed by Tony Lindgren

twl4030-madc: Fix arbitrarily initialized function pointer

req is an automatic variable and thus we cannot rely on it being initialized to
zero (I am leaving the 0!= NULL discussion aside). Other functions test
if this pointer is NULL, in order to determine whether it is a valid address or
not.
Signed-off-by: default avatarViktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent b3e668fe
......@@ -367,6 +367,7 @@ static int twl4030_madc_ioctl(struct inode *inode, struct file *filp,
req.channels = (1<<par.channel);
req.do_avg = par.average;
req.method = TWL4030_MADC_SW1;
req.func_cb = NULL;
val = twl4030_madc_conversion(&req);
if (val <= 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment