Showing error 1641

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


Source:

340                                input_report_switch(hp_wmi_input_dev,
341                                                    key->keycode,
342                                                    hp_wmi_dock_state());
343                                input_sync(hp_wmi_input_dev);
344                                break;
345                        }
346                } else if (eventcode == 0x5) {
347                        if (wifi_rfkill)
348                                rfkill_force_state(wifi_rfkill,
349                                                   hp_wmi_wifi_state());
350                        if (bluetooth_rfkill)
351                                rfkill_force_state(bluetooth_rfkill,
352                                                   hp_wmi_bluetooth_state());
353                        if (wwan_rfkill)
354                                rfkill_force_state(wwan_rfkill,
355                                                   hp_wmi_wwan_state());
356                } else
357                        printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n",
358                               eventcode);
359        } else
360                printk(KERN_INFO "HP WMI: Unknown response received\n");
361}
362
363static int __init hp_wmi_input_setup(void)
364{
365        struct key_entry *key;
366        int err;
367
368        hp_wmi_input_dev = input_allocate_device();
369
370        hp_wmi_input_dev->name = "HP WMI hotkeys";
371        hp_wmi_input_dev->phys = "wmi/input0";
372        hp_wmi_input_dev->id.bustype = BUS_HOST;
373        hp_wmi_input_dev->getkeycode = hp_wmi_getkeycode;
374        hp_wmi_input_dev->setkeycode = hp_wmi_setkeycode;
375
376        for (key = hp_wmi_keymap; key->type != KE_END; key++) {
377                switch (key->type) {
378                case KE_KEY:
379                        set_bit(EV_KEY, hp_wmi_input_dev->evbit);
380                        set_bit(key->keycode, hp_wmi_input_dev->keybit);
Show full sources