Skip to content

Commit

Permalink
[media] budget-av: only use t_state if initialized
Browse files Browse the repository at this point in the history
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: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Paul Bolle authored and Mauro Carvalho Chehab committed Dec 21, 2012
1 parent 6dc8f38 commit cb31c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb-frontends/tda8261_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit cb31c74

Please sign in to comment.