lkml.org 
[lkml]   [2005]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[DVB patch 17/37] dib3000: add NULL pointer check
    prevent NULL pointer related Oopses (Patrick Boettcher)

    Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
    ---

    drivers/media/dvb/frontends/dib3000mb.c | 2 +-
    drivers/media/dvb/frontends/dib3000mc.c | 2 +-
    2 files changed, 2 insertions(+), 2 deletions(-)

    Index: linux-2.6.12-rc4/drivers/media/dvb/frontends/dib3000mb.c
    ===================================================================
    --- linux-2.6.12-rc4.orig/drivers/media/dvb/frontends/dib3000mb.c 2005-05-08 16:21:47.000000000 +0200
    +++ linux-2.6.12-rc4/drivers/media/dvb/frontends/dib3000mb.c 2005-05-08 16:22:51.000000000 +0200
    @@ -61,7 +61,7 @@ static int dib3000mb_set_frontend(struct
    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));
    Index: linux-2.6.12-rc4/drivers/media/dvb/frontends/dib3000mc.c
    ===================================================================
    --- linux-2.6.12-rc4.orig/drivers/media/dvb/frontends/dib3000mc.c 2005-05-08 16:21:47.000000000 +0200
    +++ linux-2.6.12-rc4/drivers/media/dvb/frontends/dib3000mc.c 2005-05-08 16:22:51.000000000 +0200
    @@ -463,7 +463,7 @@ static int dib3000mc_set_frontend(struct
    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));
    --

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-05-08 21:30    [W:0.028 / U:32.736 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site