diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 22caf9b8926f..df63fe15dd6b 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -157,12 +157,9 @@ acd_reinit(device_t dev) { struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_device *atadev = device_get_softc(dev); - struct acd_softc *cdp = device_get_ivars(dev); if (((atadev->unit == ATA_MASTER) && !(ch->devices & ATA_ATAPI_MASTER)) || ((atadev->unit == ATA_SLAVE) && !(ch->devices & ATA_ATAPI_SLAVE))) { - device_set_ivars(dev, NULL); - free(cdp, M_ACD); return 1; } ATA_SETMODE(device_get_parent(dev), dev); diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c index b87e54c41e9e..0f989134276f 100644 --- a/sys/dev/ata/atapi-fd.c +++ b/sys/dev/ata/atapi-fd.c @@ -149,12 +149,9 @@ afd_reinit(device_t dev) { struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_device *atadev = device_get_softc(dev); - struct afd_softc *fdp = device_get_ivars(dev); if (((atadev->unit == ATA_MASTER) && !(ch->devices & ATA_ATAPI_MASTER)) || ((atadev->unit == ATA_SLAVE) && !(ch->devices & ATA_ATAPI_SLAVE))) { - device_set_ivars(dev, NULL); - free(fdp, M_AFD); return 1; } ATA_SETMODE(device_get_parent(dev), dev); diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index 360e0068886b..f12f4b43f501 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -195,12 +195,9 @@ ast_reinit(device_t dev) { struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_device *atadev = device_get_softc(dev); - struct ast_softc *stp = device_get_ivars(dev); if (((atadev->unit == ATA_MASTER) && !(ch->devices & ATA_ATAPI_MASTER)) || ((atadev->unit == ATA_SLAVE) && !(ch->devices & ATA_ATAPI_SLAVE))) { - device_set_ivars(dev, NULL); - free(stp, M_AST); return 1; } ATA_SETMODE(device_get_parent(dev), dev);