Showing error 1624

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


Source:

1488
1489exit_nomem:
1490        printk(KERN_ERR IPWIRELESS_PCCARD_NAME
1491                        ": not enough memory to alloc control packet\n");
1492        hw->to_setup = -1;
1493}
1494
1495static void handle_setup_get_version_rsp(struct ipw_hardware *hw,
1496                unsigned char vers_no)
1497{
1498        del_timer(&hw->setup_timer);
1499        hw->initializing = 0;
1500        printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": card is ready.\n");
1501
1502        if (vers_no == TL_SETUP_VERSION)
1503                __handle_setup_get_version_rsp(hw);
1504        else
1505                printk(KERN_ERR IPWIRELESS_PCCARD_NAME
1506                                ": invalid hardware version no %u\n",
1507                                (unsigned int) vers_no);
1508}
1509
1510static void ipw_send_setup_packet(struct ipw_hardware *hw)
1511{
1512        struct ipw_setup_get_version_query_packet *ver_packet;
1513
1514        ver_packet = alloc_ctrl_packet(
1515                        sizeof(struct ipw_setup_get_version_query_packet),
1516                        ADDR_SETUP_PROT, TL_PROTOCOLID_SETUP,
1517                        TL_SETUP_SIGNO_GET_VERSION_QRY);
1518        ver_packet->header.length = sizeof(struct tl_setup_get_version_qry);
1519
1520        /*
1521         * Response is handled in handle_received_SETUP_packet
1522         */
1523        send_packet(hw, PRIO_SETUP, &ver_packet->header);
1524}
1525
1526static void handle_received_SETUP_packet(struct ipw_hardware *hw,
1527                                         unsigned int address,
1528                                         const unsigned char *data, int len,
Show full sources