Skip to content

Commit

Permalink
[PATCH] dvb: dib3000: add NULL pointer check
Browse files Browse the repository at this point in the history
prevent NULL pointer related Oopses (Patrick Boettcher)

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Johannes Stezenbach authored and Linus Torvalds committed May 17, 2005
1 parent b874270 commit b1471c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/dib3000mb.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe,
fe_code_rate_t fe_cr = FEC_NONE;
int search_state, seq;

if (tuner) {
if (tuner && state->config.pll_addr && state->config.pll_set) {
dib3000mb_tuner_pass_ctrl(fe,1,state->config.pll_addr(fe));
state->config.pll_set(fe, fep, NULL);
dib3000mb_tuner_pass_ctrl(fe,0,state->config.pll_addr(fe));
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/dib3000mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe,
int search_state,auto_val;
u16 val;

if (tuner) { /* initial call from dvb */
if (tuner && state->config.pll_addr && state->config.pll_set) { /* initial call from dvb */
dib3000mc_tuner_pass_ctrl(fe,1,state->config.pll_addr(fe));
state->config.pll_set(fe,fep,NULL);
dib3000mc_tuner_pass_ctrl(fe,0,state->config.pll_addr(fe));
Expand Down

0 comments on commit b1471c4

Please sign in to comment.