]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Remove redundant freeing code from aic7770
authorDave Jones <davej@redhat.com>
Fri, 10 Sep 2004 09:37:47 +0000 (05:37 -0400)
committerDave Jones <davej@delerium.codemonkey.org.uk>
Fri, 10 Sep 2004 09:37:47 +0000 (05:37 -0400)
ahc_alloc already frees the 'name' if ahc=NULL

Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aic7xxx/aic7770_osm.c

index 54a09155e67b704222e023b1a92da2ec0a33c8f7..d97a8b137fe050f51424b5f111b5b14704ae9139 100644 (file)
@@ -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;