From c2235096d7615219059d5c2652b5eaf94de49318 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Thu, 24 Feb 2005 02:03:55 +0000 Subject: [PATCH] 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 --- sys/dev/dpt/dpt_pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/dpt/dpt_pci.c b/sys/dev/dpt/dpt_pci.c index 7385215ae26..a3fa41ba280 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); }