Skip to contentSkip to conversation

Remove redundant freeing code from aic7770

PATCH New Dave Jones 1 participant 1 message Sep 1, 2004

Subsystems (2)
lore
Share & tools
lore

Dave Jones

author
#0 lore raw

PATCH 1/1 Remove redundant freeing code from aic7770

ahc_alloc already frees the 'name' if ahc=NULL

Spotted with the source checker from Coverity.com.

drivers/scsi/aic7xxx/aic7770_osm.c +1 -3
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/scsi/aic7xxx/aic7770_osm.c linux-2.6/drivers/scsi/aic7xxx/aic7770_osm.c
@@ -185,10 +185,8 @@ aic7770_linux_config(struct aic7770_iden
 		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;