lkml.org 
[lkml]   [2002]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [bk/patch] driver model update: device_unregister()

    ChangeSet@1.599, 2002-10-08 17:23:56-07:00, mochel@osdl.org
    driver model: check return of get_device() when creating a driverfs file.

    diff -Nru a/drivers/base/fs/device.c b/drivers/base/fs/device.c
    --- a/drivers/base/fs/device.c Tue Oct 8 17:55:20 2002
    +++ b/drivers/base/fs/device.c Tue Oct 8 17:55:20 2002
    @@ -90,8 +90,7 @@
    {
    int error = -EINVAL;

    - if (dev) {
    - get_device(dev);
    + if (get_device(dev)) {
    error = driverfs_create_file(&entry->attr,&dev->dir);
    put_device(dev);
    }
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:29    [W:0.018 / U:0.692 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site