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
@ -156,7 +156,6 @@ dpt_pci_attach (device_t dev)
|
|||||||
s = splcam();
|
s = splcam();
|
||||||
|
|
||||||
if (dpt_init(dpt) != 0) {
|
if (dpt_init(dpt) != 0) {
|
||||||
dpt_free(dpt);
|
|
||||||
error = ENXIO;
|
error = ENXIO;
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
@ -178,8 +177,7 @@ dpt_pci_attach (device_t dev)
|
|||||||
bad:
|
bad:
|
||||||
dpt_release_resources(dev);
|
dpt_release_resources(dev);
|
||||||
|
|
||||||
if (dpt)
|
dpt_free(dpt);
|
||||||
dpt_free(dpt);
|
|
||||||
|
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user