Staging: comedi: add addi-data drivers
Dan Carpenter
dan.carpenter at oracle.com
Sat Sep 29 07:08:32 UTC 2012
Hi Ian, Hartley,
This is a semi-automatic email about new static checker warnings.
The patch c995fe9475e0: "Staging: comedi: add addi-data drivers" from
Feb 12, 2009, leads to the following Smatch complaint:
drivers/staging/comedi/drivers/addi-data/addi_common.c:1590 i_ADDI_Attach()
error: we previously assumed '(dev->board_ptr)->pc_EepromChip' could be null (see line 1522)
drivers/staging/comedi/drivers/addi-data/addi_common.c
1521
1522 if ((this_board->pc_EepromChip == NULL)
^^^^^^^^^^^^^^^^^^^^^^^^^
Smatch sees this.
1523 || (strcmp(this_board->pc_EepromChip, ADDIDATA_9054) != 0)) {
1524 /************************************/
1525 /* Test if more that 1 address used */
1526 /************************************/
[snip]
1586 /* Read eepeom and fill addi_board Structure */
1587
1588 if (this_board->i_PCIEeprom) {
^^^^^^^^^^^^^^^^^^^^^^^
1589 printk("\nPCI Eeprom used");
1590 if (!(strcmp(this_board->pc_EepromChip, "S5920"))) {
^^^^^^^^^^^^^^^^^^^^^^^^^
These should probably be using the same variable, yes? This code has
been this way since the code was added to staging.
1591 /* Set 3 wait stait */
1592 if (!(strcmp(this_board->pc_DriverName, "apci035"))) {
regards,
dan carpenter
More information about the devel
mailing list