Showing error 1632

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/media/common/tuners/tda18271-fe.c
Line in file: 1160
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 07:54:05 UTC


Source:

1130                .frequency_min  =  45000000,
1131                .frequency_max  = 864000000,
1132                .frequency_step =     62500
1133        },
1134        .init              = tda18271_init,
1135        .sleep             = tda18271_sleep,
1136        .set_params        = tda18271_set_params,
1137        .set_analog_params = tda18271_set_analog_params,
1138        .release           = tda18271_release,
1139        .get_frequency     = tda18271_get_frequency,
1140        .get_bandwidth     = tda18271_get_bandwidth,
1141};
1142
1143struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
1144                                     struct i2c_adapter *i2c,
1145                                     struct tda18271_config *cfg)
1146{
1147        struct tda18271_priv *priv = NULL;
1148        int instance;
1149
1150        mutex_lock(&tda18271_list_mutex);
1151
1152        instance = hybrid_tuner_request_state(struct tda18271_priv, priv,
1153                                              hybrid_tuner_instance_list,
1154                                              i2c, addr, "tda18271");
1155        switch (instance) {
1156        case 0:
1157                goto fail;
1158        case 1:
1159                /* new tuner instance */
1160                priv->gate = (cfg) ? cfg->gate : TDA18271_GATE_AUTO;
1161                priv->role = (cfg) ? cfg->role : TDA18271_MASTER;
1162                priv->cal_initialized = false;
1163                mutex_init(&priv->lock);
1164
1165                fe->tuner_priv = priv;
1166
1167                if (cfg)
1168                        priv->small_i2c = cfg->small_i2c;
1169
1170                if (tda_fail(tda18271_get_id(fe)))
Show full sources