Commit 0886f5e6 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[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: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 02c266a4
...@@ -185,10 +185,8 @@ aic7770_linux_config(struct aic7770_identity *entry, aic7770_dev_t dev, ...@@ -185,10 +185,8 @@ aic7770_linux_config(struct aic7770_identity *entry, aic7770_dev_t dev,
return (ENOMEM); return (ENOMEM);
strcpy(name, buf); strcpy(name, buf);
ahc = ahc_alloc(&aic7xxx_driver_template, name); ahc = ahc_alloc(&aic7xxx_driver_template, name);
if (ahc == NULL) { if (ahc == NULL)
free(name, M_DEVBUF);
return (ENOMEM); return (ENOMEM);
}
error = aic7770_config(ahc, entry, eisaBase); error = aic7770_config(ahc, entry, eisaBase);
if (error != 0) { if (error != 0) {
ahc->bsh.ioport = 0; ahc->bsh.ioport = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment