mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-01 17:00:36 +00:00
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
This commit is contained in:
parent
87ace10fd7
commit
c2235096d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142356
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user