Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 479cc46 in mainline


Ignore:
Timestamp:
2016-03-16T10:34:14Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
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.