From: Jesper Juhl <jesper.juhl@xxxxxxxxx> The Coverity checker noticed that we have a potential NULL pointer deref in drivers/scsi/aic7xxx/aic7xxx_core.c::ahc_print_register(). This patch handles it by adding the same test against NULL that is used elsewhere in the same function. Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/scsi/aic7xxx/aic7xxx_core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/scsi/aic7xxx/aic7xxx_core.c~fix-a-potential-null-pointer-deref-in-the-aic7xxx-ahc_print_register-function drivers/scsi/aic7xxx/aic7xxx_core.c --- a/drivers/scsi/aic7xxx/aic7xxx_core.c~fix-a-potential-null-pointer-deref-in-the-aic7xxx-ahc_print_register-function +++ a/drivers/scsi/aic7xxx/aic7xxx_core.c @@ -6557,7 +6557,8 @@ ahc_print_register(ahc_reg_parse_entry_t printed = printf("%s[0x%x]", name, value); if (table == NULL) { printed += printf(" "); - *cur_column += printed; + if (cur_column != NULL) + *cur_column += printed; return (printed); } printed_mask = 0; _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html