Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux-2.6-microblaze.git] / drivers / scsi / aic7xxx / aic79xx_core.c
index 1c617c0..98b02e7 100644 (file)
@@ -9402,10 +9402,9 @@ ahd_loadseq(struct ahd_softc *ahd)
        if (cs_count != 0) {
 
                cs_count *= sizeof(struct cs);
-               ahd->critical_sections = kmalloc(cs_count, GFP_ATOMIC);
+               ahd->critical_sections = kmemdup(cs_table, cs_count, GFP_ATOMIC);
                if (ahd->critical_sections == NULL)
                        panic("ahd_loadseq: Could not malloc");
-               memcpy(ahd->critical_sections, cs_table, cs_count);
        }
        ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS|FASTMODE);