summaryrefslogtreecommitdiffstats
path: root/sys/dev/dpt
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-02-24 02:03:55 +0000
committersam <sam@FreeBSD.org>2005-02-24 02:03:55 +0000
commit0cc0296750152da3583fac96771e9219858726d8 (patch)
treefde96d8eac3efab63e309c8640108e7cc9a68540 /sys/dev/dpt
parent361f2ee16db415a2b1d085dcfbe6ddc46b7d5576 (diff)
downloadFreeBSD-src-0cc0296750152da3583fac96771e9219858726d8.zip
FreeBSD-src-0cc0296750152da3583fac96771e9219858726d8.tar.gz
o nuke duplicate call of dpt_free when dpt_init fails
o nuke gratuitous null ptr check; softc can never be null in this routine Noticed by: Coverity Prevent analysis tool Reviewed by: mdodd
Diffstat (limited to 'sys/dev/dpt')
-rw-r--r--sys/dev/dpt/dpt_pci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/dpt/dpt_pci.c b/sys/dev/dpt/dpt_pci.c
index 7385215..a3fa41b 100644
--- a/sys/dev/dpt/dpt_pci.c
+++ b/sys/dev/dpt/dpt_pci.c
@@ -156,7 +156,6 @@ dpt_pci_attach (device_t dev)
s = splcam();
if (dpt_init(dpt) != 0) {
- dpt_free(dpt);
error = ENXIO;
goto bad;
}
@@ -178,8 +177,7 @@ dpt_pci_attach (device_t dev)
bad:
dpt_release_resources(dev);
- if (dpt)
- dpt_free(dpt);
+ dpt_free(dpt);
return (error);
}
OpenPOWER on IntegriCloud