drivers: scsi: aic7xxx: made use of kmemdup
Subsystems (2)
PATCH 1/1 drivers: scsi: aic7xxx: made use of kmemdup
From: Aliasgar Surti <[email protected]>
There is usage of kmalloc following memcpy in this driver file.
Instead of using these functions, this change is made to use kmemdup which has the same functionality.
Signed-off-by Aliasgar Surti <[email protected]>
--- drivers/scsi/aic7xxx/aic79xx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/aic7xxx/aic79xx_core.c +2 -2
@@ -9442,10 +9442,10 @@ 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 );
Signature · 1 line
2.17.1