lkml.org 
[lkml]   [2004]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH] Driver Core patches for 2.6.9
    Date
    From
    ChangeSet 1.1992, 2004/09/29 16:28:06-07:00, hare@suse.de

    [PATCH] Driver Core: Handle NULL arg for put_device()

    Since get_device() accepts a NULL argument, put_device() should do so, too.

    Signed-off-by: Hannes Reinecke <hare@suse.de>
    Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


    drivers/base/core.c | 3 ++-
    1 files changed, 2 insertions(+), 1 deletion(-)


    diff -Nru a/drivers/base/core.c b/drivers/base/core.c
    --- a/drivers/base/core.c 2004-10-19 09:20:41 -07:00
    +++ b/drivers/base/core.c 2004-10-19 09:20:41 -07:00
    @@ -293,7 +293,8 @@
    */
    void put_device(struct device * dev)
    {
    - kobject_put(&dev->kobj);
    + if (dev)
    + kobject_put(&dev->kobj);
    }


    -
    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 14:07    [W:3.378 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site