提交 bc8263f1 编写于 作者: J John W. Linville

airo: correct improper initialization of local variable

Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4aa188e1
...@@ -4727,7 +4727,7 @@ static int proc_stats_rid_open( struct inode *inode, ...@@ -4727,7 +4727,7 @@ static int proc_stats_rid_open( struct inode *inode,
StatsRid stats; StatsRid stats;
int i, j; int i, j;
__le32 *vals = stats.vals; __le32 *vals = stats.vals;
int len = le16_to_cpu(stats.len); int len;
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -4738,6 +4738,7 @@ static int proc_stats_rid_open( struct inode *inode, ...@@ -4738,6 +4738,7 @@ static int proc_stats_rid_open( struct inode *inode,
} }
readStatsRid(apriv, &stats, rid, 1); readStatsRid(apriv, &stats, rid, 1);
len = le16_to_cpu(stats.len);
j = 0; j = 0;
for(i=0; statsLabels[i]!=(char *)-1 && i*4<len; i++) { for(i=0; statsLabels[i]!=(char *)-1 && i*4<len; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册