Showing error 1832

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/net/wireless/rt2x00/rt2x00firmware.c
Line in file: 101
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

 71        INFO(rt2x00dev, "Firmware detected - version: %d.%d.\n",
 72             fw->data[fw->size - 4], fw->data[fw->size - 3]);
 73
 74        rt2x00dev->fw = fw;
 75
 76        return 0;
 77
 78exit:
 79        release_firmware(fw);
 80
 81        return retval;
 82}
 83
 84int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
 85{
 86        int retval;
 87
 88        if (!test_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags))
 89                return 0;
 90
 91        if (!rt2x00dev->fw) {
 92                retval = rt2x00lib_request_firmware(rt2x00dev);
 93                if (retval)
 94                        return retval;
 95        }
 96
 97        /*
 98         * Send firmware to the device.
 99         */
100        retval = rt2x00dev->ops->lib->load_firmware(rt2x00dev,
101                                                    rt2x00dev->fw->data,
102                                                    rt2x00dev->fw->size);
103
104        /*
105         * When the firmware is uploaded to the hardware the LED
106         * association status might have been triggered, for correct
107         * LED handling it should now be reset.
108         */
109        rt2x00leds_led_assoc(rt2x00dev, false);
110
111        return retval;
Show full sources