Showing error 1634

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/tuner-simple.c
Line in file: 1048
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 07:54:05 UTC


Source:

1018                        .addr = i2c_addr, .flags = I2C_M_RD,
1019                        .buf = b, .len = 1,
1020                };
1021
1022                if (fe->ops.i2c_gate_ctrl)
1023                        fe->ops.i2c_gate_ctrl(fe, 1);
1024
1025                if (1 != i2c_transfer(i2c_adap, &msg, 1))
1026                        printk(KERN_WARNING "tuner-simple %d-%04x: "
1027                               "unable to probe %s, proceeding anyway.",
1028                               i2c_adapter_id(i2c_adap), i2c_addr,
1029                               tuners[type].name);
1030
1031                if (fe->ops.i2c_gate_ctrl)
1032                        fe->ops.i2c_gate_ctrl(fe, 0);
1033        }
1034
1035        mutex_lock(&tuner_simple_list_mutex);
1036
1037        instance = hybrid_tuner_request_state(struct tuner_simple_priv, priv,
1038                                              hybrid_tuner_instance_list,
1039                                              i2c_adap, i2c_addr,
1040                                              "tuner-simple");
1041        switch (instance) {
1042        case 0:
1043                mutex_unlock(&tuner_simple_list_mutex);
1044                return NULL;
1045        case 1:
1046                fe->tuner_priv = priv;
1047
1048                priv->type = type;
1049                priv->tun  = &tuners[type];
1050                priv->nr   = simple_devcount++;
1051                break;
1052        default:
1053                fe->tuner_priv = priv;
1054                break;
1055        }
1056
1057        mutex_unlock(&tuner_simple_list_mutex);
1058
Show full sources