Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/pci-ide/pci-ide.c

    r221daa5 r832cbe7  
    11/*
    2  * Copyright (c) 2024 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    150150        ctrl->bmregs_physical = res->bmregs;
    151151
    152         ddf_msg(LVL_NOTE, "Bus master IDE regs I/O address: 0x%lx",
     152        ddf_msg(LVL_NOTE, "Bus master IDE regs I/O address: 0x%" PRIxPTR,
    153153            ctrl->bmregs_physical);
    154154
     
    186186        bool irq_inited = false;
    187187        ata_params_t params;
    188         void *buffer;
     188        void *buffer = NULL;
    189189
    190190        ddf_msg(LVL_DEBUG, "pci_ide_channel_init()");
     191
     192        memset(&params, 0, sizeof(params));
    191193
    192194        chan->ctrl = ctrl;
     
    294296        return EOK;
    295297error:
     298        if (chan->channel != NULL) {
     299                (void) ata_channel_destroy(chan->channel);
     300                chan->channel = NULL;
     301        }
     302        if (buffer != NULL)
     303                dmamem_unmap_anonymous(buffer);
    296304        if (irq_inited)
    297305                pci_ide_fini_irq(chan);
     
    315323        }
    316324
     325        dmamem_unmap_anonymous(chan->dma_buf);
    317326        pci_ide_fini_irq(chan);
    318327        pci_ide_fini_io(chan);
Note: See TracChangeset for help on using the changeset viewer.