diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7770_osm.c | 3 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 3 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c index 0cb8ef64b5ce..3d401d02c019 100644 --- a/drivers/scsi/aic7xxx/aic7770_osm.c +++ b/drivers/scsi/aic7xxx/aic7770_osm.c @@ -85,10 +85,9 @@ aic7770_probe(struct device *dev) int error; sprintf(buf, "ahc_eisa:%d", eisaBase >> 12); - name = kmalloc(strlen(buf) + 1, GFP_ATOMIC); + name = kstrdup(buf, GFP_ATOMIC); if (name == NULL) return (ENOMEM); - strcpy(name, buf); ahc = ahc_alloc(&aic7xxx_driver_template, name); if (ahc == NULL) return (ENOMEM); diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c index 3c85873b14b9..8466aa784ec1 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c @@ -178,10 +178,9 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ahd_get_pci_bus(pci), ahd_get_pci_slot(pci), ahd_get_pci_function(pci)); - name = kmalloc(strlen(buf) + 1, GFP_ATOMIC); + name = kstrdup(buf, GFP_ATOMIC); if (name == NULL) return (-ENOMEM); - strcpy(name, buf); ahd = ahd_alloc(NULL, name); if (ahd == NULL) return (-ENOMEM); diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c index ee05e8410754..0fc14dac7070 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c @@ -225,10 +225,9 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ahc_get_pci_bus(pci), ahc_get_pci_slot(pci), ahc_get_pci_function(pci)); - name = kmalloc(strlen(buf) + 1, GFP_ATOMIC); + name = kstrdup(buf, GFP_ATOMIC); if (name == NULL) return (-ENOMEM); - strcpy(name, buf); ahc = ahc_alloc(NULL, name); if (ahc == NULL) return (-ENOMEM); |