提交 cb31c748 编写于 作者: P Paul Bolle 提交者: Mauro Carvalho Chehab

[media] budget-av: only use t_state if initialized

Building budget-av.o triggers this GCC warning:
    In file included from drivers/media/pci/ttpci/budget-av.c:44:0:
    drivers/media/dvb-frontends/tda8261_cfg.h: In function ‘tda8261_get_bandwidth’:
    drivers/media/dvb-frontends/tda8261_cfg.h:68:21: warning: ‘t_state.bandwidth’ may be used uninitialized in this function [-Wuninitialized]
Move the printk() that uses t_state.bandwith to the location where it
should be initialized to fix this.
Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 6dc8f382
......@@ -78,7 +78,7 @@ static int tda8261_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
return err;
}
*bandwidth = t_state.bandwidth;
printk("%s: Bandwidth=%d\n", __func__, t_state.bandwidth);
}
printk("%s: Bandwidth=%d\n", __func__, t_state.bandwidth);
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册