From 0886f5e661a3a045829e2b3f357b4d7e12e19979 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Fri, 10 Sep 2004 05:37:47 -0400 Subject: [PATCH] [PATCH] Remove redundant freeing code from aic7770 ahc_alloc already frees the 'name' if ahc=NULL Spotted with the source checker from Coverity.com. Signed-off-by: Dave Jones Signed-off-by: James Bottomley --- drivers/scsi/aic7xxx/aic7770_osm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c index 54a09155e67b7..d97a8b137fe05 100644 --- a/drivers/scsi/aic7xxx/aic7770_osm.c +++ b/drivers/scsi/aic7xxx/aic7770_osm.c @@ -185,10 +185,8 @@ aic7770_linux_config(struct aic7770_identity *entry, aic7770_dev_t dev, return (ENOMEM); strcpy(name, buf); ahc = ahc_alloc(&aic7xxx_driver_template, name); - if (ahc == NULL) { - free(name, M_DEVBUF); + if (ahc == NULL) return (ENOMEM); - } error = aic7770_config(ahc, entry, eisaBase); if (error != 0) { ahc->bsh.ioport = 0; -- 2.53.0