Ignore:
File:
1 edited

Legend:

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

    r07039850 r2a5d4649  
    169169        isa_ide_ctrl_t *ctrl;
    170170        isa_ide_hwres_t res;
     171        unsigned chans;
    171172        errno_t rc;
    172173
     
    187188        ctrl->dev = dev;
    188189
     190        chans = 0;
     191
    189192        rc = isa_ide_channel_init(ctrl, &ctrl->channel[0], 0, &res);
    190         if (rc == ENOENT)
     193        if (rc == EOK)
     194                ++chans;
     195        else if (rc != ENOENT)
    191196                goto error;
    192197
    193198        rc = isa_ide_channel_init(ctrl, &ctrl->channel[1], 1, &res);
    194         if (rc == ENOENT)
    195                 goto error;
    196 
    197         if (rc != EOK) {
    198                 ddf_msg(LVL_ERROR, "Failed initializing ATA controller.");
     199        if (rc == EOK)
     200                ++chans;
     201        else if (rc != ENOENT)
     202                goto error;
     203
     204        if (chans == 0) {
     205                ddf_msg(LVL_ERROR, "No ISA IDE devices found.");
    199206                rc = EIO;
    200207                goto error;
Note: See TracChangeset for help on using the changeset viewer.