Changeset 479cc46 in mainline


Ignore:
Timestamp:
2016-03-16T10:34:14Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
669e9b5
Parents:
562a48b
Message:

Avoid using dev if create_device() fails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r562a48b r479cc46  
    129129
    130130        ddf_dev_t *dev = create_device();
     131        if (!dev) {
     132                free(dev_name);
     133                async_answer_0(iid, ENOMEM);
     134                return;
     135        }
    131136
    132137        /* Add one reference that will be dropped by driver_dev_remove() */
Note: See TracChangeset for help on using the changeset viewer.