Showing error 1839

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


Source:

 9660                /* Verify */
 9661                for (i = last_probe+1; i > 0; i--) {
 9662                        u_int stack_entry;
 9663
 9664                        stack_entry = ahd_inb(ahd, STACK)
 9665                                    |(ahd_inb(ahd, STACK) << 8);
 9666                        if (stack_entry != i)
 9667                                goto sized;
 9668                }
 9669                last_probe++;
 9670        }
 9671sized:
 9672        return (last_probe);
 9673}
 9674
 9675int
 9676ahd_print_register(const ahd_reg_parse_entry_t *table, u_int num_entries,
 9677                   const char *name, u_int address, u_int value,
 9678                   u_int *cur_column, u_int wrap_point)
 9679{
 9680        int        printed;
 9681        u_int        printed_mask;
 9682
 9683        if (cur_column != NULL && *cur_column >= wrap_point) {
 9684                printf("\n");
 9685                *cur_column = 0;
 9686        }
 9687        printed = printf("%s[0x%x]", name, value);
 9688        if (table == NULL) {
 9689                printed += printf(" ");
 9690                *cur_column += printed;
 9691                return (printed);
 9692        }
 9693        printed_mask = 0;
 9694        while (printed_mask != 0xFF) {
 9695                int entry;
 9696
 9697                for (entry = 0; entry < num_entries; entry++) {
 9698                        if (((value & table[entry].mask)
 9699                          != table[entry].value)
 9700                         || ((printed_mask & table[entry].mask)
Show full sources